[問題] stray '\' in program(已解決)
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
Dev-C++
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
問題(Question):
把這個網址中的四個程式碼集合成一個專案,讓它們可以成功被編譯
http://tools.ietf.org/html/rfc1321
錯誤結果(Wrong Output):
stray '\' in program
程式碼(Code):(請善用置底文網頁, 記得排版)
出現錯誤的程式碼:
FF (a, b, c, d, x[ 0], S11, 0xd76aa478); / * 1 */
FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
上述這16行程式片斷在文獻的第12頁
google疑似有找到解答,是說用「dos2unix 指令轉一下」即可。
文章:http://cotton5415.wordpress.com/2007/09/13/stray-in-program/
請問...上述網址裡的solution:%dos2unix <your_c_file>要怎麼用...囧rz"
補充說明(Supplement):
這個程式最後會用cmd.exe開來測試。
以上,感謝各位,有勞各位大大了m(_ _)m
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 120.105.217.27
推
06/19 23:16, , 1F
06/19 23:16, 1F
→
06/19 23:18, , 2F
06/19 23:18, 2F
→
06/19 23:19, , 3F
06/19 23:19, 3F
※ 編輯: dolphin7 來自: 120.105.217.27 (06/19 23:19)
→
06/19 23:21, , 4F
06/19 23:21, 4F
→
06/19 23:58, , 5F
06/19 23:58, 5F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章