看板 C_and_CPP 關於我們 聯絡資訊
string pos_table[120][5]; for(i=0;i<120;i++){ for(int j=0;j<5;j++){ fprintf(fptr, "%d,",pos_table[i][j].c_str()); } }
arno855268:不好意思,其實我在全域變數定義過: 12/27 21:07
arno855268:int pos_table[120][5]={-1}; 12/27 21:07 所以你定義了兩個 pos_table 嗎? 可是你的迴圈裡永遠只看得到上面紅色的 string pos_table[120][5] 而看不到你全域的 int pos_table[120][5] 喔... -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.117.171.46
arno855268:ㄜㄜ...白癡了我XD 12/27 21:20
arno855268:我把string pos_table[120][5];刪掉就搞定了! 12/27 21:20
arno855268:謝謝各位... 12/27 21:20