int main(void)
{
Shape shape;
cout << sizeof(shape) << endl;
//int *p = (int *)&shape;
//cout << p << endl;
//cout << (unsigned int)(*p) << endl;
Circle circle(100);
cout << sizeof(circle) << endl;
//int *q = (int *)&circle;
//cout << q << endl;
//cout << (unsigned int)(*q) << endl;
//q++;
//cout << (unsigned int)(*q) << endl;
system("pause");
return 0;
}
然后结果就显示
1
8
隔壁村的严二狗
相关分类