摘要: 普通类的sizeof 类比struct 注意字节对齐#include <iostream>using namespace std;class A{public: int data; char p;};int main(){ cout << sizeof (A) << endl; //字节对齐,输出8. return 0;}含有虚函数的类的sizeof#include <iostream>u... 阅读全文
posted @ 2013-05-09 21:42 helloweworld 阅读(225) 评论(0) 推荐(0) 编辑