[問題] scanf xcode

看板C_and_CPP (C/C++)作者 (Jimmy)時間13年前 (2012/08/31 23:28), 編輯推噓0(003)
留言3則, 3人參與, 最新討論串1/1
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) xcode 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) no 問題(Question): 無法讀取輸入的數字 餵入的資料(Input): 1 1 3 預期的正確結果(Expected Output): 3 錯誤結果(Wrong Output): (lldb) 1 1 3 error: '1' is not a valid command. (lldb) 程式碼(Code):(請善用置底文網頁, 記得排版) #include <stdio.h> #include <stdlib.h> int main(){ int row,col,num[2][2]; scanf("%d",&col); scanf("%d",&row); scanf("%d",&num[row][col]); printf("%d",num[row][col]); return 0; } 補充說明(Supplement): -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.51.112

08/31 23:32, , 1F
你在debugger裡啊...
08/31 23:32, 1F

09/01 00:12, , 2F
請問輸入的地方在哪裡?
09/01 00:12, 2F

09/01 01:39, , 3F
cmd shift c 開啟 console
09/01 01:39, 3F
文章代碼(AID): #1GGDWi76 (C_and_CPP)
文章代碼(AID): #1GGDWi76 (C_and_CPP)