[問題] 程式記憶體區段錯誤 ??
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
linux-gcc
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
問題(Question):
char *passwd;
scanf( "%s",passwd); --> 程式記憶體區段錯誤 !!??
要寫 scanf( "%s",&passwd); 才讓程式碼正確??
passwd不就是位址了嗎?? 不好意思 觀念不是很清楚...
請多多指教..
餵入的資料(Input):
預期的正確結果(Expected Output):
錯誤結果(Wrong Output):
程式碼(Code):(請善用置底文網頁, 記得排版)
補充說明(Supplement):
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.26.127.117
→
12/07 17:22, , 1F
12/07 17:22, 1F
推
12/07 17:27, , 2F
12/07 17:27, 2F
→
12/07 17:27, , 3F
12/07 17:27, 3F
→
12/07 21:59, , 4F
12/07 21:59, 4F
→
12/07 22:00, , 5F
12/07 22:00, 5F
→
12/07 23:34, , 6F
12/07 23:34, 6F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章
11
37