Compiler Error C2462 (Windows CE 5.0)

Send Feedback

'identifier' : cannot define a type in a 'new-expression'

You cannot define a type in the operand field of the new operator.

Put the type definition in a separate statement.

The following example shows how this error might occur.

void main()
{
    new struct S { int i; };     // error
}

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.