32bit_me (32bit_me) wrote,
32bit_me
32bit_me

C и C++

Originally published at 32 bit.me. You can comment here or there.

Что можно в С, но нельзя в С++?

Отсюда: http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=/com.ibm.xlcpp8a.doc/language/ref/param_decl.htm

С: The user-defined type can also be defined within the parameter declaration.

 С++: The user-defined type can not be defined within the parameter declaration.

void print(struct X { int i; } x);   // legal in C
void print(struct X { int i; } x);   // error in C++

Tags: c++, программирование
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 1 comment