| 5 | 1/1 | 返回列表 |
| 查看: 1551 | 回復(fù): 8 | |||
| 當(dāng)前只顯示滿足指定條件的回帖,點(diǎn)擊這里查看本話題的所有回帖 | |||
[交流]
【求助】為什么我編譯了一個(gè)書本上的無(wú)錯(cuò)誤的C++程序,卻有這么多的錯(cuò)誤?
|
|||
|
[ Last edited by zyj8119 on 2010-10-12 at 01:57 ] |


|
錯(cuò)誤是: --------------------Configuration: 1 - Win32 Debug-------------------- Compiling... bingtai.cpp C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(128) : error C2143: syntax error : missing ';' before 'return' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(139) : error C2501: 'd' : missing storage-class or type specifiers C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(139) : error C2065: 'p' : undeclared identifier C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(139) : error C2065: 'n' : undeclared identifier C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(139) : error C2109: subscript requires array or pointer type C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(139) : error C2109: subscript requires array or pointer type C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(140) : error C2143: syntax error : missing ';' before 'if' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(141) : error C2143: syntax error : missing ';' before '{' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(141) : error C2447: missing function header (old-style formal list?) C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(146) : error C2057: expected constant expression C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(146) : error C2466: cannot allocate an array of constant size 0 C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(146) : error C2501: 'r' : missing storage-class or type specifiers C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(146) : error C2440: 'initializing' : cannot convert from 'int' to 'int []' There are no conversions to array types, although there are conversions to references or pointers to arrays C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(147) : error C2143: syntax error : missing ';' before 'for' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(147) : error C2143: syntax error : missing ')' before ';' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(147) : error C2143: syntax error : missing ';' before '>=' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(147) : error C2501: 'i' : missing storage-class or type specifiers C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(147) : error C2143: syntax error : missing ';' before '>=' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(147) : error C2143: syntax error : missing ';' before '--' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(147) : error C2501: 'i' : missing storage-class or type specifiers C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(147) : error C2086: 'i' : redefinition C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(147) : error C2143: syntax error : missing ';' before '--' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(147) : error C2059: syntax error : ')' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(148) : error C2143: syntax error : missing ';' before '{' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(148) : error C2447: missing function header (old-style formal list?) C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(154) : error C2057: expected constant expression C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(154) : error C2466: cannot allocate an array of constant size 0 C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(154) : error C2501: 'js' : missing storage-class or type specifiers C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(154) : error C2440: 'initializing' : cannot convert from 'int' to 'int []' There are no conversions to array types, although there are conversions to references or pointers to arrays C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(155) : error C2143: syntax error : missing ';' before 'for' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(155) : error C2143: syntax error : missing ')' before ';' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(155) : error C2143: syntax error : missing ';' before '>=' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(155) : error C2501: 'k' : missing storage-class or type specifiers C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(155) : error C2143: syntax error : missing ';' before '>=' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(155) : error C2143: syntax error : missing ';' before '--' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(155) : error C2501: 'k' : missing storage-class or type specifiers C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(155) : error C2086: 'k' : redefinition C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(155) : error C2143: syntax error : missing ';' before '--' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(155) : error C2059: syntax error : ')' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(157) : error C2143: syntax error : missing ';' before '{' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(157) : error C2447: missing function header (old-style formal list?) C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(160) : error C2143: syntax error : missing ';' before 'delete' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(161) : error C2143: syntax error : missing ';' before '}' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(161) : error C2143: syntax error : missing ';' before '}' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(161) : error C2143: syntax error : missing ';' before '}' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(164) : error C2143: syntax error : missing ';' before '{' C:\Program Files\Microsoft Visual Studio\MyProjects\1\bingtai.cpp(164) : error C2447: missing function header (old-style formal list?) Error executing cl.exe. bingtai.obj - 47 error(s), 0 warning(s) |


| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 304求調(diào)劑 +6 | 司空. 2026-03-18 | 6/300 |
|
|---|---|---|---|---|
|
[考研] 085700資源與環(huán)境308求調(diào)劑 +3 | 墨墨漠 2026-03-18 | 3/150 |
|
|
[考研] 295求調(diào)劑 +3 | 一志愿京區(qū)211 2026-03-18 | 5/250 |
|
|
[考研] 085600材料與化工 +5 | 安全上岸! 2026-03-16 | 5/250 |
|
|
[考研] 311求調(diào)劑 +6 | 26研0 2026-03-15 | 6/300 |
|
|
[考研] 一志愿西南交大,求調(diào)劑 +4 | 材化逐夢(mèng)人 2026-03-18 | 4/200 |
|
|
[考研] 312求調(diào)劑 +8 | 陌宸希 2026-03-16 | 9/450 |
|
|
[考研] 304求調(diào)劑 +12 | 小熊joy 2026-03-14 | 13/650 |
|
|
[考研] 0703化學(xué)336分求調(diào)劑 +6 | zbzihdhd 2026-03-15 | 7/350 |
|
|
[考研] 考研求調(diào)劑 +3 | 橘頌. 2026-03-17 | 4/200 |
|
|
[碩博家園] 湖北工業(yè)大學(xué) 生命科學(xué)與健康學(xué)院-課題組招收2026級(jí)食品/生物方向碩士 +3 | 1喜春8 2026-03-17 | 5/250 |
|
|
[考研] 一志愿,福州大學(xué)材料專碩339分求調(diào)劑 +3 | 木子momo青爭(zhēng) 2026-03-15 | 3/150 |
|
|
[基金申請(qǐng)] 國(guó)自科面上基金字體 +6 | iwuli 2026-03-12 | 7/350 |
|
|
[考研] 326求調(diào)劑 +4 | 諾貝爾化學(xué)獎(jiǎng)覬?/a> 2026-03-15 | 7/350 |
|
|
[考研] 0703化學(xué)調(diào)劑 290分有科研經(jīng)歷,論文在投 +7 | 膩膩gk 2026-03-14 | 7/350 |
|
|
[考研] 材料與化工(0856)304求B區(qū)調(diào)劑 +6 | 邱gl 2026-03-12 | 7/350 |
|
|
[考研] 材料工程調(diào)劑 +9 | 咪咪空空 2026-03-12 | 9/450 |
|
|
[考研] 26調(diào)劑/材料科學(xué)與工程/總分295/求收留 +9 | 2026調(diào)劑俠 2026-03-12 | 9/450 |
|
|
[考研] 材料專碩350 求調(diào)劑 +4 | 王金科 2026-03-12 | 4/200 |
|
|
[考研] 308求調(diào)劑 +3 | 是Lupa啊 2026-03-12 | 3/150 |
|