| 5 | 1/1 | 返回列表 |
| 查看: 1664 | 回復: 8 | ||
| 當前只顯示滿足指定條件的回帖,點擊這里查看本話題的所有回帖 | ||
易沁樺木蟲 (小有名氣)
|
[求助]
VC++下調(diào)試C程序,出現(xiàn)很多語法錯誤
|
|
|
用純的C語言編了個程序(不會C++),在VC++中打開后,點擊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 時出錯. surface growth.obj - 1 error(s), 0 warning(s) —————————————————————— 可是我覺得語法沒有錯,比如最開始兩句,對應(yīng)第17行的句子是: for (x = 1; x < =N; x++),“=”號怎么有錯呢,)前面也不用加“;”了啊 而且最后一句顯示只有一個錯誤,到底是哪兒呢? 求大俠解答。若解決了問題,還可以追加金幣,謝謝!! |

木蟲 (小有名氣)

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

木蟲 (小有名氣)

木蟲 (著名寫手)

| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 化學工程085602 305分求調(diào)劑 +12 | RichLi_ 2026-03-25 | 12/600 |
|
|---|---|---|---|---|
|
[考研] 309求調(diào)劑 +4 | gajsj 2026-03-25 | 5/250 |
|
|
[考研] 求調(diào)劑 +3 | 蘆lty 2026-03-25 | 4/200 |
|
|
[考研] 考研調(diào)劑 +6 | 來好運來來來 2026-03-21 | 7/350 |
|
|
[考研] 308求調(diào)劑 +5 | 墨墨漠 2026-03-25 | 5/250 |
|
|
[考研] 334分 一志愿武理-080500 材料求調(diào)劑 +4 | 李李不服輸 2026-03-25 | 4/200 |
|
|
[考研] 284求調(diào)劑 +15 | Zhao anqi 2026-03-22 | 15/750 |
|
|
[考研]
材料學碩,求調(diào)劑
6+4
|
糖葫蘆888ll 2026-03-22 | 9/450 |
|
|
[考研] 299求調(diào)劑 +7 | shxchem 2026-03-20 | 9/450 |
|
|
[考研]
|
黃粱一夢千年 2026-03-24 | 3/150 |
|
|
[考研] 327求調(diào)劑 +5 | prayer13 2026-03-23 | 5/250 |
|
|
[考研] 324求調(diào)劑 +6 | lucky呀呀呀鴨 2026-03-20 | 6/300 |
|
|
[考研] 269專碩求調(diào)劑 +6 | 金恩貝 2026-03-21 | 6/300 |
|
|
[考研] 求調(diào)劑 +5 | Zhangbod 2026-03-21 | 7/350 |
|
|
[考研] 303求調(diào)劑 +5 | 安憶靈 2026-03-22 | 6/300 |
|
|
[考研] 求調(diào)劑 +3 | 13341 2026-03-20 | 3/150 |
|
|
[考研] 一志愿深大,0703化學,總分302,求調(diào)劑 +4 | 七月-七七 2026-03-21 | 4/200 |
|
|
[考研] 求助 +5 | 夢里的無言 2026-03-21 | 6/300 |
|
|
[考研] 085601調(diào)劑 358分 +3 | zzzzggh 2026-03-20 | 4/200 |
|
|
[考研] 22408 344分 求調(diào)劑 一志愿 華電計算機技術(shù) +4 | solanXXX 2026-03-20 | 4/200 |
|