结构体内初始化是错误的吧。去掉就行。 int t = 0 ; -> int t;另,我是C,不是CPP还有,strcpy(time[0].ob, "水" ); 这样赋值。
time【10】.ob就可以了,