Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
'identifier' uses undefined class/struct/union 'name'
Remarks
The specified identifier is an undefined class, structure, or union.
This error can be caused by initializing an anonymous union.
Examples
The following example generates C2079:
// C2079.cpp
// compile with: /EHsc
#include <iostream>
int main() {
std::ifstream g; // C2079
}
Possible resolution:
// C2079b.cpp
// compile with: /EHsc
#include <fstream>
int main( ) {
std::ifstream g;
}
C2079 can also occur if you attempt to declare an object on the stack of a type whose forward declaration is only in scope.
// C2079c.cpp
class A;
class B {
A a; // C2079
};
class A {};
Possible resolution:
// C2079d.cpp
// compile with: /c
class A;
class C {};
class B {
A * a;
C c;
};
class A {};