[問題] 程式的小錯誤..
#include <stdio.h>
int main(void)
{
struct status
{
unsigned sex:1;
unsigned marriage:1;
unsigned age:7;
unsigned height:8;
unsigned weight:8;
};
struct status maruco={0,0,19,162,50};
if(maruco.sex==0)
printf("姓別:女,");
else
printf("姓別:男,");
if(maruco.marriage==0)
printf("未婚,");
else
printf("已婚,");
printf("%d 歲,身高%d 公分,",maruco.age,maruco.height);
printf("體重%d 公斤\n",maruco.weight);
printf("sizeof(maruco)=%d\n",sizeof(maruco));
system ("pause"); <---------這行出錯了...哈..請問是為什麼呀..我搞不懂..
return 0;
}
謝謝解答
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.170.87.225
→
06/05 13:42, , 1F
06/05 13:42, 1F
→
06/05 13:44, , 2F
06/05 13:44, 2F
推
06/05 14:49, , 3F
06/05 14:49, 3F
→
06/05 14:49, , 4F
06/05 14:49, 4F