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

Compiler Error C2436

Error Message

'identifier' : member function or nested class in constructor initializer list

Member functions or local classes in the constructor initializer list cannot be initialized.

The following sample generates C2436:

// C2436.cpp
struct S{
   int f();
   struct Inner{
      int i;
   S():f(10), Inner(0){}   // C2436

Community Additions

© 2015 Microsoft