65,211
社区成员
发帖
与我相关
我的任务
分享
class Type;
int main()
{
Type obj;
int* p = (int*)&obj;
int* p2 = static_cast<int*>(&obj); //error
}
class Type
{};
int main()
{
Type obj;
int* p = (int*)&obj;
int* p2 = reinterpret_cast<int*>(&obj);
system("pause");
return 0;
}