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

金蟲 (小有名氣)
|
錯誤是: --------------------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ā)表 | |
|---|---|---|---|---|
|
[考研] 311求調(diào)劑 +4 | 冬十三 2026-03-18 | 4/200 |
|
|---|---|---|---|---|
|
[考研] 085600材料與化工調(diào)劑 324分 +8 | llllkkkhh 2026-03-18 | 8/400 |
|
|
[考研] 328求調(diào)劑,英語六級551,有科研經(jīng)歷 +3 | 生物工程調(diào)劑 2026-03-16 | 10/500 |
|
|
[考研] 材料專碩英一數(shù)二306 +4 | z1z2z3879 2026-03-18 | 4/200 |
|
|
[考研] 308求調(diào)劑 +4 | 是Lupa啊 2026-03-16 | 4/200 |
|
|
[考研] 材料專碩326求調(diào)劑 +6 | 墨煜姒莘 2026-03-15 | 7/350 |
|
|
[考研] 085601求調(diào)劑 +4 | Du.11 2026-03-16 | 4/200 |
|
|
[考研] 有沒有道鐵/土木的想調(diào)劑南林,給自己招師弟中~ +3 | TqlXswl 2026-03-16 | 7/350 |
|
|
[考研] 一志愿蘇州大學材料工程(085601)專碩有科研經(jīng)歷三項國獎兩個實用型專利一項省級立項 +6 | 大火山小火山 2026-03-16 | 8/400 |
|
|
[考研] 304求調(diào)劑 +5 | 素年祭語 2026-03-15 | 5/250 |
|
|
[考研] 一志愿211 0703方向310分求調(diào)劑 +3 | 努力奮斗112 2026-03-15 | 3/150 |
|
|
[考研] 304求調(diào)劑 +3 | 曼殊2266 2026-03-14 | 3/150 |
|
|
[考研] 070305求調(diào)劑 +3 | mlpqaz03 2026-03-14 | 4/200 |
|
|
[考研] 266求調(diào)劑 +4 | 學員97LZgn 2026-03-13 | 4/200 |
|
|
[考研] 材料與化工求調(diào)劑一志愿 985 總分 295 +8 | dream…… 2026-03-12 | 8/400 |
|
|
[考研] 材料工程調(diào)劑 +9 | 咪咪空空 2026-03-12 | 9/450 |
|
|
[考研] 304求調(diào)劑 +7 | 7712b 2026-03-13 | 7/350 |
|
|
[碩博家園] 085600 260分求調(diào)劑 +3 | 天空還下雨么 2026-03-13 | 5/250 |
|
|
[考研] 070303一志愿西北大學學碩310找調(diào)劑 +3 | d如愿上岸 2026-03-13 | 3/150 |
|
|
[考研] 283求調(diào)劑,材料、化工皆可 +8 | 蘇打水7777 2026-03-11 | 10/500 |
|