编译器警告(等级 2)C4099

identifier”:使用“object_type1”首次看到的类型名称现在使用“object_type2

声明为结构的对象定义为类,或者声明为类的对象定义为结构。 编译器使用定义中给定的类型。

示例

以下示例生成 C4099。

// C4099.cpp
// compile with: /W2 /c
struct A;
class A {};   // C4099, use different identifier or use same object type