C編譯時(shí)常見(jiàn)的錯(cuò)誤_第1頁(yè)
C編譯時(shí)常見(jiàn)的錯(cuò)誤_第2頁(yè)
C編譯時(shí)常見(jiàn)的錯(cuò)誤_第3頁(yè)
C編譯時(shí)常見(jiàn)的錯(cuò)誤_第4頁(yè)
C編譯時(shí)常見(jiàn)的錯(cuò)誤_第5頁(yè)
已閱讀5頁(yè),還剩8頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、1、 fatal error C1010: unexpected end of file while looking for precompiled header directive。 尋找預(yù)編譯頭文件路徑時(shí)遇到了不該遇到的文件尾。(一般是沒(méi)有#include stdafx.h) 2、fatal error C1083: Cannot open include file: R.h: No such file or directory 不能打開(kāi)包含文件“R.h”:沒(méi)有這樣的文件或目錄。 3、error C2011: C: class type redefinition 類“C”重定義。 4、er

2、ror C2018: unknown character 0xa3 不認(rèn)識(shí)的字符0xa3。(一般是漢字或中文標(biāo)點(diǎn)符號(hào)) 5、error C2057: expected constant expression 希望是常量表達(dá)式。(一般出現(xiàn)在switch語(yǔ)句的case分支中) 6、error C2065: IDD_MYDIALOG : undeclared identifier “IDD_MYDIALOG”:未聲明過(guò)的標(biāo)識(shí)符。 7、error C2082: redefinition of formal parameter bReset 函數(shù)參數(shù)“bReset”在函數(shù)體中重定義。 8、error C

3、2143: syntax error: missing : before 句法錯(cuò)誤:“”前缺少“;”。 9、error C2146: syntax error : missing ; before identifier dc 句法錯(cuò)誤:在“dc”前丟了“;”。 10、error C2196: case value 69 already used 值69已經(jīng)用過(guò)。(一般出現(xiàn)在switch語(yǔ)句的case分支中) 11、error C2509: OnTimer : member function not declared in CHelloView 成員函數(shù)“OnTimer”沒(méi)有在“CHelloVi

4、ew”中聲明。 12、error C2511: reset: overloaded member function void (int) not found in B 重載的函數(shù)“void reset(int)”在類“B”中找不到。 13、error C2555: B:f1: overriding virtual function differs from A:f1 only by return type or calling convention 類B對(duì)類A中同名函數(shù)f1的重載僅根據(jù)返回值或調(diào)用約定上的區(qū)別。 14、error C2660: SetTimer : function does

5、not take 2 parameters “SetTimer”函數(shù)不傳遞2個(gè)參數(shù)。 15、warning C4035: f: no return value “f”的return語(yǔ)句沒(méi)有返回值。 16、warning C4553: = = : operator has no effect; did you intend =? 沒(méi)有效果的運(yùn)算符“= =”;是否改為“=”? 17、warning C4700: local variable bReset used without having been initialized 局部變量“bReset”沒(méi)有初始化就使用。 18、error C471

6、6: CMyApp:InitInstance : must return a value “CMyApp:InitInstance”函數(shù)必須返回一個(gè)值。 19、LINK : fatal error LNK1168: cannot open Debug/P1.exe for writing 連接錯(cuò)誤:不能打開(kāi)P1.exe文件,以改寫(xiě)內(nèi)容。(一般是P1.Exe還在運(yùn)行,未關(guān)閉) 20、error LNK2001: unresolved external symbol public: virtual _ _thiscall C:C(void) 連接時(shí)發(fā)現(xiàn)沒(méi)有實(shí)現(xiàn)的外部符號(hào)(變量、函數(shù)等)。 func

7、tion call missing argument list 調(diào)用函數(shù)的時(shí)候沒(méi)有給參數(shù)。 member function definition looks like a ctor, but name does not match enclosing class 成員函數(shù)聲明了但沒(méi)有使用 unexpected end of file while looking for precompiled header directive 在尋找預(yù)編譯頭文件時(shí)文件意外結(jié)束,編譯不正常終止可能造成這種情況Ambiguous operators need parentheses 不明確的運(yùn)算,需要用括號(hào)括起來(lái)

8、Ambiguous symbol xxx 不明確的符號(hào) Argument list syntax error 參數(shù)表語(yǔ)法錯(cuò)誤 Array bounds missing 丟失數(shù)組界限符 Array size too large 數(shù)組尺寸太大 Bad character in parameters 參數(shù)中有不適當(dāng)?shù)淖址?Bad file name format in include directive 包含命令中文件名格式不正確 Bad ifdef directive syntax 編譯預(yù)處理ifdef有語(yǔ)法錯(cuò)誤 Bad ifndef directive syntax 編譯預(yù)處理ifndef有語(yǔ)法

9、錯(cuò)誤 Bad undef directive syntax 編譯預(yù)處理undef有語(yǔ)法錯(cuò)誤 Call of non-function 調(diào)用未定義的函數(shù) Call to function with no prototype 調(diào)用函數(shù)時(shí)沒(méi)有函數(shù)的說(shuō)明 Cannot modify a const object 不允許修改常量對(duì)象 Case outside of switch Case 出現(xiàn)在 switch 之外 Case statement missing 漏掉了 Case 語(yǔ)句 Case syntax error Case 語(yǔ)法錯(cuò)誤 Case outside of switch Case 出現(xiàn)在

10、switch 之外 Case statement missing 漏掉了 Case 語(yǔ)句 Case syntax error Case 語(yǔ)法錯(cuò)誤 Code has no effect 代碼不可能執(zhí)行到 Compound statement missing 復(fù)合語(yǔ)句漏掉了 Conflicting type modifiers 不明確的類型說(shuō)明符 Constant expression required 要求常量表達(dá)式 Constant out of range in comparison 在比較中常量超出范圍 Conversion may lose significant digits 轉(zhuǎn)換時(shí)會(huì)

11、掉失有意義的數(shù)字 Conversion of near pointer not allowed 不允許轉(zhuǎn)換返指針 Could not find file xxx 找不到xxx文件 Declaration missing ; 說(shuō)明缺少分號(hào); Declaration syntax error 說(shuō)明中出現(xiàn)語(yǔ)法錯(cuò)誤 Default outside of switch default出現(xiàn)在switch語(yǔ)句之外 Define directive needs an identifier 定義編譯預(yù)處理需要標(biāo)識(shí)符 Division by zero 用零作除數(shù) Do statement must have wh

12、ile do-while語(yǔ)句中缺少while部分 Enum syntax error 枚舉類型語(yǔ)法錯(cuò)誤 Enumeration constant syntax error 枚舉常數(shù)語(yǔ)法錯(cuò)誤 Error directive: xxx 錯(cuò)誤的編譯預(yù)處理命令 Error writing output file 寫(xiě)輸出文件錯(cuò)誤 Expression syntax error 表達(dá)式語(yǔ)法錯(cuò)誤 Extra parameter in call 調(diào)用時(shí)出現(xiàn)多余錯(cuò)誤 File name too long 文件名太長(zhǎng) Function call missing ) 函數(shù)調(diào)用缺少右括號(hào) Function defin

13、ition out of place 函數(shù)定義位置錯(cuò)誤 Function should return a value 函數(shù)返回一個(gè)值 Goto statement missing label goto 語(yǔ)句沒(méi)有標(biāo)號(hào) Hexadecimal or octal constant too large 16進(jìn)制或8進(jìn)制常數(shù)太大 Illegal character x 非法字 x Illegal initialization 非法的初始化 Illegal octal digit 非法的8進(jìn)制數(shù)字 Illegal pointer subtraction 非法的指針相減 Illegal structure

14、operation 非法的結(jié)構(gòu)體操作 Illegal use of pointer 指針使用非法 Improper use of a typedef symbol 類型符號(hào)定義使用不恰當(dāng) In-line assembly not allowed 不允許使用行間匯編 Incompatible storage class 存儲(chǔ)類別不相容 Incompatible type conversion 不相容的類型轉(zhuǎn)換 Incorrect number format 錯(cuò)誤的數(shù)據(jù)格式 Incorrect use of default default使用不正確 Invalid indirection 無(wú)效的間

15、接運(yùn)算 Invalid pointer addition 指針相加無(wú)效 Irreducible expression tree 無(wú)法執(zhí)行的表達(dá)式運(yùn)算 Lvalur required 需要邏輯值(0或非0值) Macro argument syntax error 宏參數(shù)語(yǔ)法錯(cuò)誤 Macro expansion too long 宏的擴(kuò)展以后太長(zhǎng) Mismatched number of parameters in definition 定義中參數(shù)個(gè)數(shù)不匹配 Misplaced break 此處不應(yīng)出現(xiàn)break語(yǔ)句 Misplaced continue 此處不應(yīng)出現(xiàn)continue語(yǔ)句 Mis

16、placed decimal point 此處不應(yīng)出現(xiàn)小數(shù)點(diǎn) Misplaced elif directive 此處不應(yīng)出現(xiàn)編譯預(yù)處理elif Misplaced else 此處不應(yīng)出現(xiàn)else Misplaced else directive 此處不應(yīng)出現(xiàn)編譯預(yù)處理 else Misplaced endif directive 此處不應(yīng)出現(xiàn)編譯預(yù)處理 endif Must be addressable 必須是可以編址的 Must take address of memory location 必須存儲(chǔ)定位的地址 No declaration for function xxx 沒(méi)有函數(shù) xxx

17、 的說(shuō)明 No stack 缺少堆棧 No type information 沒(méi)有類型信息 Non-portable pointer assignment 不可移動(dòng)的指針(地址常數(shù))賦值 Non-portable pointer comparison 不可移動(dòng)的指針(地址常數(shù))比較 Non-portable pointer conversion 不可移動(dòng)的指針(地址常數(shù))轉(zhuǎn)換 Not a valid expression format type 不合法的表達(dá)式格式 Not an allowed type 不允許使用的類型 Numeric constant too large 數(shù)值常數(shù)太大 Ou

18、t of memory 內(nèi)存不夠用 Parameter xxx is never used 參數(shù) xxx 沒(méi)有用到 Pointer required on left side of - - 符號(hào)的左邊必須是指針 Possible use of xxx before definition 在定義之前就使用了 xxx(警告) Possibly incorrect assignment 賦值可能不正確 Redefinition of xxx is not identical xxx 的兩次定義不一致 Register allocation failure 寄存器定址失敗 Repeat count n

19、eeds an lvalue 重復(fù)計(jì)數(shù)需要邏輯值 Size of structure or array not known 結(jié)構(gòu)體或數(shù)組的大小不確定 Statement missing ; 語(yǔ)句后缺少; Structure or union syntax error 結(jié)構(gòu)體或聯(lián)合體語(yǔ)法錯(cuò)誤 Structure size too large 結(jié)構(gòu)體的尺寸太大 Subscripting missing 下標(biāo)缺少右方括號(hào) Superfluous &with function or array 函數(shù)或數(shù)組中有多余的& Suspicious pointer conversion 可疑的指針轉(zhuǎn)換 Symb

20、ol limit exceeded 符號(hào)超限 Too few parameters in call 函數(shù)調(diào)用時(shí)的實(shí)參少于函數(shù)的參數(shù) Too many error or warning messages 錯(cuò)誤或警告信息太多 Too much auto memory in function 函數(shù)中用到的局部存儲(chǔ)太多 Too much global data defined in file 文件中全局?jǐn)?shù)據(jù)太多 Too consecutive dots 兩個(gè)連續(xù)的句點(diǎn) Type mismatch in parameter xxx 參數(shù)xxx類型不匹配 Type mismatch in redeclar

21、ation of xxx xxx 重定義時(shí)的類型不匹配 Unable to create output file xxx 無(wú)法建立輸出文件 xxx Unable to open include file xxx 無(wú)法打開(kāi)被包容的文件 xxx Bit field too large 位字段太長(zhǎng) Unable to open input file xxx 無(wú)法打開(kāi)輸入文件 xxx Undefined label xxx 沒(méi)有定義的標(biāo)號(hào) xxx Undefined structure xxx 沒(méi)有定義的結(jié)構(gòu) xxx Undefined symbol xxx 沒(méi)有定義的符號(hào) xxx Unexpected end of file in comment started on line xxx 從 xxx 行開(kāi)始

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論