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

Compiler Error C2504

'class' : base class undefined

The base class is declared but never defined.

Possible cause

  • Missing include file.
  • External base class not declared with extern.

The following sample generates C2504:

// C2504.cpp
class A;
class B : public A
{   // C2504, define A before using it as a base class
};

int main()
{
}
Show:
© 2015 Microsoft