当前位置: 代码迷 >> C++ >> 内存储器相关(C/C++)基础知识
  详细解决方案

内存储器相关(C/C++)基础知识

热度:7789   发布时间:2013-02-26 00:00:00.0
内存相关(C/C++)基础知识
 #include <iostream> #include <cstdio> #include <cmath> #include <algorithm>using namespace std;struct s{    int x:3;     int y:4;     int z:5;     double a; }; struct a {     int x:4;     int y:5;     int z:6;     int c; }; int main(){    a d;    cout<<&d<<endl;    d.z = d.x + d.y;    printf("%d %d %d %d\n",d.x, d.y, d.z, sizeof(d));    cout << sizeof(s) << endl;    cout << sizeof(a) << endl;    return 0;}创新工场校招: 
//http://blog.csdn.net/huangxy10/article/details/8026464
1楼wangwenhao00昨天 22:50
创新工场校招:http://blog.csdn.net/huangxy10/article/details/8026464
  相关解决方案