| 5 | 1/1 | 返回列表 |
| 查看: 1661 | 回復: 8 | ||
| 當前只顯示滿足指定條件的回帖,點擊這里查看本話題的所有回帖 | ||
易沁樺木蟲 (小有名氣)
|
[求助]
VC++下調試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) —————————————————————— 可是我覺得語法沒有錯,比如最開始兩句,對應第17行的句子是: for (x = 1; x < =N; x++),“=”號怎么有錯呢,)前面也不用加“;”了啊 而且最后一句顯示只有一個錯誤,到底是哪兒呢? 求大俠解答。若解決了問題,還可以追加金幣,謝謝! |

木蟲 (小有名氣)

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

木蟲 (小有名氣)

木蟲 (著名寫手)

| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 291 求調劑 +6 | 化工2026屆畢業(yè)?/a> 2026-03-21 | 7/350 |
|
|---|---|---|---|---|
|
[考研] 309求調劑 +4 | gajsj 2026-03-25 | 5/250 |
|
|
[考研]
|
18419759900 2026-03-25 | 3/150 |
|
|
[考研] 335分 | 材料與化工專碩 | GPA 4.07 | 有科研經歷 +6 | cccchenso 2026-03-23 | 6/300 |
|
|
[考研] 材料學碩333求調劑 +4 | 北道巷 2026-03-24 | 4/200 |
|
|
[考研] 284求調劑 +15 | Zhao anqi 2026-03-22 | 15/750 |
|
|
[考研] 271求調劑 +4 | 生如夏花… 2026-03-22 | 4/200 |
|
|
[考研] B區(qū)考研調劑 +4 | yqdszhdap- 2026-03-22 | 5/250 |
|
|
[考研] 材料學求調劑 +6 | Stella_Yao 2026-03-20 | 6/300 |
|
|
[考研] 食品專碩 一志愿雙一流 328 +3 | xiaom99 2026-03-21 | 4/200 |
|
|
[考研] 341求調劑(一志愿湖南大學070300) +5 | 番茄頭--- 2026-03-22 | 6/300 |
|
|
[考研] 284求調劑 +3 | yanzhixue111 2026-03-23 | 6/300 |
|
|
[考研] 材料/農業(yè)專業(yè),07/08開頭均可,過線就行 +3 | 呵唔哦豁 2026-03-23 | 4/200 |
|
|
[考研] 接收2026碩士調劑(學碩+專碩) +4 | allen-yin 2026-03-23 | 6/300 |
|
|
[考研] 298求調劑 +8 | 上岸6666@ 2026-03-20 | 8/400 |
|
|
[考研] 260求調劑 +3 | 朱芷琳 2026-03-20 | 4/200 |
|
|
[考研] 材料學碩301分求調劑 +7 | Liyouyumairs 2026-03-21 | 7/350 |
|
|
[考研] 求調劑 +3 | .m.. 2026-03-21 | 4/200 |
|
|
[考研] 材料與化工(0856)304求 B區(qū) 調劑 +3 | 邱gl 2026-03-21 | 3/150 |
|
|
[考研] 一志愿 南京航空航天大學大學 ,080500材料科學與工程學碩 +5 | @taotao 2026-03-20 | 5/250 |
|