| 5 | 1/1 | 返回列表 |
| 查看: 1552 | 回復(fù): 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ā)表 | |
|---|---|---|---|---|
|
[考研] 085700資源與環(huán)境308求調(diào)劑 +3 | 墨墨漠 2026-03-18 | 3/150 |
|
|---|---|---|---|---|
|
[考研] 一志愿華中科技大學,080502,354分求調(diào)劑 +4 | 守候夕陽CF 2026-03-18 | 4/200 |
|
|
[考研] 344求調(diào)劑 +6 | knight344 2026-03-16 | 7/350 |
|
|
[考研] 26調(diào)劑/材料/英一數(shù)二/總分289/已過A區(qū)線 +7 | 步川酷紫123 2026-03-13 | 7/350 |
|
|
[考研] 266求調(diào)劑 +5 | 陽陽哇塞 2026-03-14 | 9/450 |
|
|
[考研] 0817 化學工程 299分求調(diào)劑 有科研經(jīng)歷 有二區(qū)文章 +7 | rare12345 2026-03-18 | 7/350 |
|
|
[考研]
|
胡辣湯放糖 2026-03-15 | 6/300 |
|
|
[考研] 環(huán)境工程調(diào)劑 +8 | 大可digkids 2026-03-16 | 8/400 |
|
|
[考研] 334求調(diào)劑 +3 | 志存高遠意在機?/a> 2026-03-16 | 3/150 |
|
|
[考研] 326求調(diào)劑 +5 | 上岸的小葡 2026-03-15 | 6/300 |
|
|
[考研] 26考研求調(diào)劑 +6 | 丶宏Sir 2026-03-13 | 6/300 |
|
|
[考研] 有沒有道鐵/土木的想調(diào)劑南林,給自己招師弟中~ +3 | TqlXswl 2026-03-16 | 7/350 |
|
|
[考研] 326求調(diào)劑 +4 | 諾貝爾化學獎覬?/a> 2026-03-15 | 7/350 |
|
|
[考研] 318求調(diào)劑 +3 | Yanyali 2026-03-15 | 3/150 |
|
|
[考研] 285求調(diào)劑 +6 | ytter 2026-03-12 | 6/300 |
|
|
[考研] 294求調(diào)劑 +3 | Zys010410@ 2026-03-13 | 4/200 |
|
|
[考研] 本科南京大學一志愿川大藥學327 +3 | 麥田耕者 2026-03-14 | 3/150 |
|
|
[考研] 265求調(diào)劑 +4 | 威化餅07 2026-03-12 | 4/200 |
|
|
[考研] 工科278分求調(diào)劑 +5 | 周慢熱啊 2026-03-12 | 7/350 |
|
|
[考研] 0817化學工程與技術(shù)考研312分調(diào)劑 +3 | T123 tt 2026-03-12 | 3/150 |
|