#include <stdio.h>#include <stdlib.h>
struct st { int x:2;/*改为2*/};
int main(void){ struct st s;
s.x = 1; printf("s.x = %d\n", s.x);
exit(0);}
[此贴子已经被作者于2007-7-18 19:53:13编辑过]
或者改为:#include <stdio.h>#include <stdlib.h>
struct st { unsigned int x:1;/*改为unsigned int 形,保证没有符号位*/};
s.x=1; printf("s.x = %d\n", s.x); getch(); exit(0);}