Compiler Warning (level 2) C4099
Visual Studio 2010
'identifier' : type name first seen using 'objecttype1' now seen using 'objecttype2'
An object declared as a structure is defined as a class, or an object declared as a class is defined as a structure. The compiler uses the type given in the definition.
Useless warning ?
I have a big problem with this warning: According to the C++ standard, a struct is no different from a class (except for default visibility, which only has some impact for the class definition), and the following code should compile with no warnings:
class T;
struct T;
class T {};
I know that, once upon a time, VC++6.0 used a different name mangling for classes and struct, which created some link-time problem. I don't know if this bug has been corrected, and the document associated with this warning does not explicit if it is related to this bug or not.
class T;
struct T;
class T {};
I know that, once upon a time, VC++6.0 used a different name mangling for classes and struct, which created some link-time problem. I don't know if this bug has been corrected, and the document associated with this warning does not explicit if it is related to this bug or not.