




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、C語言命語法錯誤大全C語言命語法錯誤大全fatalerrorC1004:unexpectedendoffilefound未找到文件末尾(可能是括號匹配問題)fatalerrorC1021:invalidpreprocessorcommand1nclude無效的編譯預處理命令1ncludefatalerrorC1083:Cannotopenincludefile:stdi.h:Nosuchfileordirectory不能打開頭文件stdi.h,文件或文件夾不存在errorC2101:&onconstantC語言命語法錯誤大全fatalerrorC1004:unexpectedendoffile
2、found未找到文件末尾(可能是括號匹配問題)fatalerrorC1021:invalidpreprocessorcommand1nclude無效的編譯預處理命令1ncludefatalerrorC1083:Cannotopenincludefile:stdi.h:Nosuchfileordirectory不能打開頭文件stdi.h,文件或文件夾不存在errorC2101:&onconstant不能計算常量的地址errorC2059:syntaxerror:while在while附近,存在語法錯誤errorC2061:syntaxerror:identifierx標識符x的附近,存在語法錯誤
3、errorC2065:i:undeclaredidentifier變量i未定義errorC2078:toomanyinitializers數組/結構等變量初始化時的數據太多errorC2087:missingsubscript丟失數組下標errorC2106:=:leftoperandmustbel-value=的左側應當是左值,即不能是常量errorC2115:=:incompatibletypes=兩側的類型不兼容errorC2133:a:unknownsizea(可能是數組名)的大小不確定。errorC2137:emptycharacterconstant空的字符常量errorC2143
4、:syntaxerror:missing;before.在.之前,缺少;errorC2146:syntaxerror:missing)beforeidentifier.在標識符.之前缺少)errorC2181:illegalelsewithoutmatchingifelse缺少匹配的iferrorC2198:printf:toofewactualparametersprintf函數的參數太少errorC2223:leftof-xmustpointtostruct/union-x的左側應是結構類型變量或聯合類型變量errorC2224:leftof.xmusthavestruct/unionty
5、pe.x的左側應是結構類型變量或聯合類型變量errorC2371:f1:redefinition;differentbasictypes函數f1的接口被重定義,參數類型或返回值類型不一致warningC4101:x:unreferencedlocalvariablex是一個從未被使用的局部變量warningC4013:fiundefined;assumingexternreturningint函數fi未定義,假設其是外部函數,返回值類型是intwarningC4020:fun:toomanyactualparameters調用fun函數時,有太多的實參warningC4033:f3mustre
6、turnavalue函數f3應當有返回值語句warningC4047:=:int*differsinlevelsofindirectionfromint賦值運算中的類型轉換:從int轉換到int*可能存在問題warningC4098:f2:voidfunctionreturningavalue函數f2是無返回值的函數,竟然有返回值語句。warningC4133:function:incompatibletypes-from.to.不兼容的類型轉換(從.類型向.類型)warningC4244:initializing:conversionfromconstdoubletoint,possible
7、lossofdata在初始化數據時,類型轉換可能導致數據丟失warningC4305:initializing:truncationfromconstinttochar初始化時,數據被截斷warningC4700:localvariablexusedwithouthavingbeeninitialized局部變量x在被使用之前未初始化,errorLNK2001:unresolvedexternalsymbol_f5f5從未定義1. Ambiguous operators need parentheses 不明確的運算需要用括號括起2. Ambiguous symbol xxx不明確的符號3.
8、Argument list syntax error 參數表語法錯誤4. Array bounds missing 丟失數組界限符5. Array size toolarge 數組尺寸太大6. Bad character in paramenters 參數中有不適當的字符7. Bad file name format in include directive 包含命令中文件名格式不正確8. Bad ifdef directive synatax 編譯預處理ifdef有語法錯9. Bad undef directive syntax 編譯預處理undef有語法錯10. Bit field too
9、 large 位字段太長11. Call of non-function 調用未定義的函數12. Call to function with no prototype 調用函數時沒有函數的說明13. Cannot modify a const object 不允許修改常量對象14. Case outside of switch 漏掉了case語句15. Case syntax error Case 語法錯誤16. Code has no effect 代碼不可能執行到17. Compound statement missing分程序漏掉18. Conflicting type modifier
10、s 不明確的類型說明符19. Constant expression required 要求常量表達式20. Constant out of range in comparison 在比較中常量超出范圍21. Conversion may lose significant digits 轉換時會丟失意義的數字22. Conversion of near pointer not allowed 不允許轉換近指針23. Could not find file xxx找不到XXX文件24. Declaration missing ;說明缺少;25. Declaration syntax error
11、說明中出現語法錯誤26. Default outside of switch Default 出現在switch語句之外27. Define directive needs an identifier 定義編譯預處理需要標識符28. Division by zero 用零作除數29. Do statement must have while Do-while語句中缺少while部分30. Enum syntax error 枚舉類型語法錯誤31. Enumeration constant syntax error 枚舉常數語法錯誤32. Error directive :xxx錯誤的編譯預處理
12、命令33. Error writing output file 寫輸出文件錯誤34. Expression syntax error 表達式語法錯誤35. Extra parameter in call 調用時出現多余錯誤36. File name too long 文件名太長37. Function call missing )函數調用缺少右括號38. Fuction definition out of place 函數定義位置錯誤39. Fuction should return a value 函數必需返回一個值40. Goto statement missing label Goto語
13、句沒有標號41. Hexadecimal or octal constant too large 16進制或8進制常數太大42. Illegal character x非法字符x43. Illegal initialization 非法的初始化44. Illegal octal digit 非法的8進制數字45. Illegal pointer subtraction 非法的指針相減46. Illegal structure operation 非法的結構體操作47. Illegal use of floating point 非法的浮點運算48. Illegal use of pointer
14、 指針使用非法49. Improper use of a typedefsymbol 類型定義符號使用不恰當50. In-line assembly not allowed 不允許使用行間匯編51. Incompatible storage class 存儲類別不相容52. Incompatible type conversion 不相容的類型轉換53. Incorrect number format 錯誤的數據格式54. Incorrect use of default Default使用不當55. Invalid indirection 無效的間接運算56. Invalid pointer
15、 addition 指針相加無效57. Irreducible expression tree 無法執行的表達式運算58. Lvalue required 需要邏輯值0或非0值59. Macro argument syntax error 宏參數語法錯誤60. Macro expansion too long 宏的擴展以后太長61. Mismatched number of parameters in definition 定義中參數個數不匹配62. Misplaced break 此處不應出現break語句63. Misplaced continue 此處不應出現continue語句64.
16、Misplaced decimal point 此處不應出現小數點65. Misplaced elif directive 不應編譯預處理elif66. Misplaced else 此處不應出現else67. Misplaced else directive 此處不應出現編譯預處理else68. Misplaced endif directive 此處不應出現編譯預處理endif69. Must be addressable 必須是可以編址的70. Must take address of memory location 必須存儲定位的地址71. No declaration for fun
17、ction xxx沒有函數xxx的說明72. No stack 缺少堆棧73. No type information 沒有類型信息74. Non-portable pointer assignment 不可移動的指針(地址常數)賦值75. Non-portable pointer comparison 不可移動的指針(地址常數)比較76. Non-portable pointer conversion 不可移動的指針(地址常數)轉換77. Not a valid expression format type 不合法的表達式格式78. Not an allowed type 不允許使用的類型7
18、9. Numeric constant too large 數值常太大80. Out of memory 內存不夠用81. Parameter xxx is never used 能數xxx沒有用到82. Pointer required on left side of -符號-的左邊必須是指針83. Possible use of xxx before definition 在定義之前就使用了xxx(警告)84. Possibly incorrect assignment 賦值可能不正確85. Redeclaration of xxx重復定義了xxx86. Redefinition of x
19、xx is not identical xxx的兩次定義不一致87. Register allocation failure 寄存器定址失敗88. Repeat count needs an lvalue 重復計數需要邏輯值89. Size of structure or array not known 結構體或數給大小不確定90. Statement missing ;語句后缺少;91. Structure or union syntax error 結構體或聯合體語法錯誤92. Structure size too large 結構體尺寸太大93. Sub scripting missin
20、g 下標缺少右方括號94. Superfluous & with function or array 函數或數組中有多余的&95. Suspicious pointer conversion 可疑的指針轉換96. Symbol limit exceeded 符號超限97. Too few parameters in call 函數調用時的實參少于函數的參數不98. Too many default cases Default太多(switch語句中一個)99. Too many error or warning messages 錯誤或警告信息太多100. Too many type in d
21、eclaration 說明中類型太多101. Too much auto memory in function 函數用到的局部存儲太多102. Too much global data defined in file 文件中全局數據太多103. Two consecutive dots 兩個連續的句點104. Type mismatch in parameter xxx 參數xxx類型不匹配105. Type mismatch in redeclaration of xxx xxx重定義的類型不匹配106. Unable to create output file xxx無法建立輸出文件xxx
22、107. Unable to open include file xxx無法打開被包含的文件xxx108. Unable to open input file xxx無法打開輸入文件xxx109. Undefined label xxx沒有定義的標號xxx110. Undefined structure xxx沒有定義的結構xxx111. Undefined symbol xxx沒有定義的符號xxx112. Unexpected end of file in comment started on line xxx 從xxx行開始的注解尚未結束文件不能結束113. Unexpected end
23、of file in conditional started on line xxx 從xxx開始的條件語句尚未結束文件不能結束114. Unknown assemble instruction 未知的匯編結構115. Unknown option 未知的操作116. Unknown preprocessor directive:xxx不認識的預處理命令xxx117. Unreachable code 無路可達的代碼118. Unterminated string or character constant 字符串缺少引號119. User break 用戶強行中斷了程序120. Void f
24、unctions may not return a value Void類型的函數不應有返回值121. Wrong number of arguments 調用函數的參數數目錯122.xxx not an argument xxx不是參數123.xxx not part of structure xxx不是結構體的一部分124. xxx statement missing ( xxx語句缺少左括號125. xxx statement missing ) xxx語句缺少右括號126. xxx statement missing ; xxx缺少分號127. xxx declared but nev
25、er used 說明了xxx但沒有使用128. xxx is assigned a value which is never used 給xxx賦了值但未用過C語言編譯錯誤信息錦集說明:Turbo C 的源程序錯誤分為三種類型:致命錯誤、一般錯誤和警告。其中,致命錯誤通常是內部編譯出錯;一般錯誤指程序的語法錯誤、磁盤或內存存取錯誤或命令行錯誤等;警告則只是指出一些得懷疑的情況,它并不防止編譯的進行。下面按字母順序AZ分別列出致命錯誤及一般錯誤信息,英漢對照及處理方法:(一)、致命錯誤英漢對照及處理方法:致命錯誤Bad call of in-line function (內部函數非法調用)分析與
26、處理:在使用一個宏定義的內部函數時,沒能正確調用。一個內部函數以兩個下劃線(_)開始和結束。Irreducable expression tree (不可約表達式樹)分析與處理:這種錯誤指的是文件行中的表達式太復雜,使得代碼生成程序無法為它生成代碼。這種表達式必須避免使用。Register allocation failure (存儲器分配失敗)分析與處理:這種錯誤指的是文件行中的表達式太復雜,代碼生成程序無法為它生成代碼。此時應簡化這種繁雜的表達式或干脆避免使用它。(二)、一般錯誤信息英漢照及處理方法#operator not followed by maco argument name(#
27、運算符后沒跟宏變元名)分析與處理:在宏定義中,#用于標識一宏變串?!?”號后必須跟一個宏變元名。xxxxxx not anargument (xxxxxx不是函數參數)分析與處理:在源程序中將該標識符定義為一個函數參數,但此標識符沒有在函數中出現。Ambiguous symbol xxxxxx(二義性符號xxxxxx)分析與處理:兩個或多個結構的某一域名相同,但具有的偏移、類型不同。在變量或表達式中引用該域而未帶結構名時,會產生二義性,此時需修改某個域名或在引用時加上結構名。Argument # missing name (參數#名丟失)分析與處理:參數名已脫離用于定義函數的函數原型。如果函數
28、以原型定義,該函數必須包含所有的參數名。Argument list syntax error (參數表出現語法錯誤)分析與處理:函數調用的參數間必須以逗號隔開,并以一個右括號結束。若源文件中含有一個其后不是逗號也不是右括號的參數,則出錯。Array bounds missing (數組的界限符丟失)分析與處理:在源文件中定義了一個數組,但此數組沒有以下右方括號結束。Array size too large (數組太大)分析與處理:定義的數組太大,超過了可用內存空間。Assembler statement too long (匯編語句太長)分析與處理:內部匯編語句最長不能超過480字節。Bad configuration file (配置文件不正確)分析與處理:TURBOC.CFG配置文件中包含的不是合適命令行選擇項的非注解文字。配置文件命令選擇項必須以一個短橫線開始。Bad file name format in include directive(包含指令中文件名格式不正確)分析與處理:包含文件名必須用引號
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 河南省濮陽市2022-2023學年高二下學期化學學業質量檢測試題(含答案)
- 倉山定向捐助活動方案
- 仙桃騎行活動策劃方案
- 代購加人活動方案
- 仲秋營銷活動方案
- 企業五四宣傳活動方案
- 企業世界閱讀日活動方案
- 企業促生產活動方案
- 企業公司宣傳舞蹈活動方案
- 企業創意元旦活動方案
- DZ 0141-1994地質勘查坑探規程
- 2024 - 2025學年浙美版一年級下冊美術期末考試試卷及答案
- 口腔合伙人合同協議書
- 2025年中國車載顯示行業市場前景預測及投資價值評估分析報告
- DB32T3436-2018 智能信包箱運營管理服務規范
- 地下工程施工安全防范措施
- 商業銀行領導力提升培訓心得體會
- 校招中建八局面試題目及答案
- DB34T 1948-2013 建設工程造價咨詢檔案立卷標準
- 部編版小學道德與法治三年級下冊期末質量檢測試卷【含答案】5套
- 傷口和傷口敷料基礎知識.ppt
評論
0/150
提交評論