为什么我在visual studio 2010 显示的是1和8

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

不拖死妥耶夫斯基
浏览 1075回答 1
1回答

隔壁村的严二狗

把类Shape Circle发来看看啊
打开App,查看更多内容
随时随地看视频慕课网APP