结果和老师讲的不一样
请教一个问题: Derived derived2(999); int* p3 = (int*)&derived2; cout << p3 << " " << (int*)&derived2.m_nNumber << endl; cout << (unsigned int)(*p3) << " " << derived2.m_nNumber << endl; 用VS2013编译,为什么结果是这样的? 00,EFF,69C 00,EFF,6A0 1,728,492 999
请教一个问题: Derived derived2(999); int* p3 = (int*)&derived2; cout << p3 << " " << (int*)&derived2.m_nNumber << endl; cout << (unsigned int)(*p3) << " " << derived2.m_nNumber << endl; 用VS2013编译,为什么结果是这样的? 00,EFF,69C 00,EFF,6A0 1,728,492 999
2016-05-09
举报