Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Compiler Error C2624

local classes cannot be used to declare 'extern' variables

A local class or structure cannot be used to declare extern variables.

The following sample generates C2624:

// C2624.cpp
int main() {
   struct C {};
   extern C ac;   // C2624
}
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.