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
不拖死妥耶夫斯基
隔壁村的严二狗
随时随地看视频慕课网APP
相关分类