Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Error C2614
Collapse the table of content
Expand the table of content

Compiler Error C2614

'class1' : illegal member initialization: 'class2' is not a base or member

Only member or base classes can appear in the initialization list for a class or structure.

The following sample generates C2614.

// C2614.cpp
// compile with: /c
struct A {
   int i;
   A( int ia ) : B( i ) {};   // C2614 B is not a member of A
};

struct A2 {
   int B;
   int i;
   A2( int ia ) : B( i ) {};   // OK
};

Community Additions

ADD
Show:
© 2015 Microsoft