class, struct, union

来源:互联网 发布:pc 文件夹恢复软件 编辑:程序博客网 时间:2024/05/18 13:04
class my{public:struct{unsigned _a: 4;unsigned _b: 4;unsigned _c: 4;unsigned _d: 4;};struct // 没有必要{int _e;int _f;};int _g;union{int _fa;int _fb;};};int _tmain(int argc, char* argv[]){my tb;tb._fa = 1;tb._a = 2;tb._e = 3;cout << tb._fb<< endl;cout << tb._a << endl;cout << tb._e << endl;return 0;}