david19842003 发表于 2013-1-27 05:37:38

test

#include <iostream>using namespace std;struct bit{   int a:3;    int b:2;    int c:3;    };int main(int argc,char *argv[]){    bit s;char *c = (char*)&s;*c = 0x99;cout << s.a <<endl<<s.b<<endl<<s.c<<endl;return 0;}
页: [1]
查看完整版本: test