struct car { int car_id; int floor; int position; int time; int n; }a[2][6]; a[0][0]={234,1,1,25,1};/*说类型不匹配*/ a[0][1]={356,1,2,15,1}; a[0][2]={478,1,3,10,1}; a[0][3]={899,1,4, 5,1};
应该是这样吧?? struct car { int car_id; int floor; int position; int time; int n; }a[2][6]={{234,1,1,25,1},{356,1,2,15,1},{478,1,3,10,1}, {899,1,4, 5,1}}; 应该可以呀