討論串[問題] passing arg 1 of `load' from incompa …
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者snowlike (snowlike)時間16年前 (2009/10/09 17:45), 編輯資訊
0
0
0
內容預覽:
void set(int *ptr, int st, int ed, int th, int etc) {. int i, tmpMax=st*ed*th*etc;. for(i=0; i<tmpMax; ++i) {. printf("%d", ptr[i]);. }. }. 感謝指教我會改進的.

推噓4(4推 0噓 0→)留言4則,0人參與, 最新作者snowlike (snowlike)時間16年前 (2009/10/09 16:48), 編輯資訊
0
0
0
內容預覽:
僅傳遞起始位址的作法應該這麼作. void set(int *ptr, int st, int ed, int th, int etc) {. int i, j, k, l;. for(i=0; i<st; ++i) {. for(j=0; j<ed; ++j) {. for(k=0; k<th;
(還有580個字)

推噓2(2推 0噓 4→)留言6則,0人參與, 最新作者QQ29 (我愛阿蓉)時間16年前 (2009/10/09 12:41), 編輯資訊
0
0
0
內容預覽:
你這樣寫除非你這四個都是const 不然看之前文章的大大們說. 這種寫法新的標準可以過 但是不建議.... 如果你硬要傳這四維陣列. 假如world大小是[1][2][3][4]. set必須宣告成 set(struct robot (*P)[2][3][4]);. 不過這樣好像也沒比較好理解. 直
首頁
上一頁
1
下一頁
尾頁