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;
}
class, struct, union
最新推荐文章于 2021-05-19 01:08:37 发布