| 9 | 1/1 | 返回列表 |
| 查看: 1656 | 回復(fù): 8 | ||
易沁樺木蟲 (小有名氣)
|
[求助]
VC++下調(diào)試C程序,出現(xiàn)很多語法錯(cuò)誤
|
|
用純的C語言編了個(gè)程序(不會(huì)C++),在VC++中打開后,點(diǎn)擊Build—Compile后,出現(xiàn)以下:(surface growth.c前面的E:\VC Project\Crystal Growth\都省略了) -----Configuration: surface growth - Win32 Debug-------------------- Compiling... surface growth.c surface growth.c(17) : error C2059: syntax error : '=' surface growth.c(17) : error C2143: syntax error : missing ';' before ')' surface growth.c(19) : warning C4552: '<=' : operator has no effect; expected operator with side-effect surface growth.c(19) : error C2143: syntax error : missing ';' before ')' surface growth.c(23) : error C2059: syntax error : 'for' surface growth.c(23) : error C2143: syntax error : missing '{' before '<=' surface growth.c(23) : error C2059: syntax error : '<=' surface growth.c(23) : error C2143: syntax error : missing '{' before '++' surface growth.c(23) : error C2059: syntax error : '++' surface growth.c(23) : error C2059: syntax error : ')' surface growth.c(24) : error C2143: syntax error : missing '{' before '<=' surface growth.c(24) : error C2059: syntax error : '<=' surface growth.c(24) : error C2143: syntax error : missing '{' before '++' surface growth.c(24) : error C2059: syntax error : '++' surface growth.c(24) : error C2059: syntax error : ')' surface growth.c(26) : error C2059: syntax error : 'for' surface growth.c(26) : error C2143: syntax error : missing '{' before '<=' surface growth.c(26) : error C2059: syntax error : '<=' surface growth.c(26) : error C2143: syntax error : missing '{' before '++' surface growth.c(26) : error C2059: syntax error : '++' surface growth.c(26) : error C2059: syntax error : ')' surface growth.c(27) : error C2143: syntax error : missing '{' before '<=' surface growth.c(27) : error C2059: syntax error : '<=' surface growth.c(27) : error C2143: syntax error : missing '{' before '++' surface growth.c(27) : error C2059: syntax error : '++' surface growth.c(27) : error C2059: syntax error : ')' surface growth.c(36) : error C2059: syntax error : 'for' surface growth.c(36) : error C2143: syntax error : missing '{' before '<=' surface growth.c(36) : error C2059: syntax error : '<=' surface growth.c(36) : error C2143: syntax error : missing '{' before '++' surface growth.c(36) : error C2059: syntax error : '++' surface growth.c(36) : error C2059: syntax error : ')' surface growth.c(45) : error C2059: syntax error : 'for' surface growth.c(45) : error C2143: syntax error : missing '{' before '<' surface growth.c(45) : error C2059: syntax error : '<' surface growth.c(45) : error C2059: syntax error : ')' surface growth.c(46) : error C2449: found '{' at file scope (missing function header?) surface growth.c(149) : error C2059: syntax error : '}' surface growth.c(151) : error C2143: syntax error : missing ')' before 'string' surface growth.c(151) : error C2143: syntax error : missing '{' before 'string' surface growth.c(151) : error C2059: syntax error : ' surface growth.c(151) : error C2059: syntax error : ')' surface growth.c(152) : error C2059: syntax error : 'for' surface growth.c(152) : error C2143: syntax error : missing '{' before '<=' surface growth.c(152) : error C2059: syntax error : '<=' surface growth.c(152) : error C2143: syntax error : missing '{' before '++' surface growth.c(152) : error C2059: syntax error : '++' surface growth.c(152) : error C2059: syntax error : ')' surface growth.c(158) : error C2059: syntax error : '}' 執(zhí)行 cl.exe 時(shí)出錯(cuò). surface growth.obj - 1 error(s), 0 warning(s) —————————————————————— 可是我覺得語法沒有錯(cuò),比如最開始兩句,對應(yīng)第17行的句子是: for (x = 1; x < =N; x++),“=”號怎么有錯(cuò)呢,)前面也不用加“;”了啊 而且最后一句顯示只有一個(gè)錯(cuò)誤,到底是哪兒呢? 求大俠解答。若解決了問題,還可以追加金幣,謝謝!! |

至尊木蟲 (著名寫手)
驃騎將軍

木蟲 (小有名氣)

木蟲 (著名寫手)

木蟲 (小有名氣)

銅蟲 (著名寫手)
銅蟲 (小有名氣)

金蟲 (正式寫手)

木蟲 (小有名氣)

| 9 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 303求調(diào)劑 +6 | 藍(lán)山月 2026-03-25 | 6/300 |
|
|---|---|---|---|---|
|
[考研] 總分293求調(diào)劑 +4 | 加一一九 2026-03-25 | 6/300 |
|
|
[考研] 材料與化工328分調(diào)劑 +6 | 。,。,。,。i 2026-03-23 | 6/300 |
|
|
[考研] 08工學(xué)調(diào)劑 +13 | 用戶573181 2026-03-20 | 18/900 |
|
|
[考研] 333求調(diào)劑 +6 | 87639 2026-03-21 | 11/550 |
|
|
[考研] 0703化學(xué)求調(diào)劑 +6 | 奶油草莓. 2026-03-22 | 7/350 |
|
|
[考研] 300分,材料,求調(diào)劑,英一數(shù)二 +5 | 超贊的 2026-03-24 | 5/250 |
|
|
[考研] 0856材料專碩353求調(diào)劑 +6 | NIFFFfff 2026-03-20 | 6/300 |
|
|
[考研] 306求0703調(diào)劑一志愿華中師范 +10 | 紙魚ly 2026-03-21 | 11/550 |
|
|
[考研] 求調(diào)劑 +6 | 研研,接電話 2026-03-24 | 7/350 |
|
|
[考研] 材料專碩331求調(diào)劑 +4 | 鮮當(dāng)牛 2026-03-24 | 4/200 |
|
|
[考研] 291求調(diào)劑 +8 | hhhhxn.. 2026-03-23 | 8/400 |
|
|
[考研] 一志愿重慶大學(xué)085700資源與環(huán)境,總分308求調(diào)劑 +7 | 墨墨漠 2026-03-23 | 8/400 |
|
|
[考研] 336求調(diào)劑 +4 | 收到VS 2026-03-20 | 4/200 |
|
|
[考研] 352求調(diào)劑 +3 | 大米飯! 2026-03-22 | 3/150 |
|
|
[考研] 一志愿中南化學(xué)(0703)總分337求調(diào)劑 +9 | niko- 2026-03-19 | 10/500 |
|
|
[考研] 初試 317 +7 | 半拉月丙 2026-03-20 | 7/350 |
|
|
[考研] 材料與化工(0856)304求B區(qū)調(diào)劑 +3 | 邱gl 2026-03-20 | 7/350 |
|
|
[考研] 317求調(diào)劑 +5 | 申子申申 2026-03-19 | 9/450 |
|
|
[考研] 一志愿南理工085701環(huán)境302求調(diào)劑院校 +3 | 葵梓衛(wèi)隊(duì) 2026-03-20 | 3/150 |
|