欧美大屁股bbbbxxxx,狼人大香伊蕉国产www亚洲,男ji大巴进入女人的视频小说,男人把ji大巴放进女人免费视频,免费情侣作爱视频

歡迎來到入門教程網(wǎng)!

C語言

當(dāng)前位置:主頁 > 軟件編程 > C語言 >

C++常見錯誤中英文對照表

來源:本站原創(chuàng)|時間:2020-01-10|欄目:C語言|點擊: 次

fatal error C1003: error count exceeds number; stopping compilation
中文對照:(編譯錯誤)錯誤太多,停止編譯
分析:修改之前的錯誤,再次編譯

fatal error C1004: unexpected end of file found
中文對照:(編譯錯誤)文件未結(jié)束
分析:一個函數(shù)或者一個結(jié)構(gòu)定義缺少“}”、或者在一個函數(shù)調(diào)用或表達(dá)式中括號沒有配對出現(xiàn)、或者注釋符“/*…*/”不完整等

fatal error C1083: Cannot open include file: 'xxx': No such file or directory
中文對照:(編譯錯誤)無法打開頭文件xxx:沒有這個文件或路徑
分析:頭文件不存在、或者頭文件拼寫錯誤、或者文件為只讀

fatal error C1903: unable to recover from previous error(s); stopping compilation
中文對照:(編譯錯誤)無法從之前的錯誤中恢復(fù),停止編譯
分析:引起錯誤的原因很多,建議先修改之前的錯誤

error C2001: newline in constant
中文對照:(編譯錯誤)常量中創(chuàng)建新行
分析:字符串常量多行書寫

error C2006: #include expected a filename, found 'identifier'
中文對照:(編譯錯誤)#include命令中需要文件名
分析:一般是頭文件未用一對雙引號或尖括號括起來,例如“#include stdio.h”

error C2007: #define syntax
中文對照:(編譯錯誤)#define語法錯誤
分析:例如“#define”后缺少宏名,例如“#define”

error C2008: 'xxx' : unexpected in macro definition
中文對照:(編譯錯誤)宏定義時出現(xiàn)了意外的xxx
分析:宏定義時宏名與替換串之間應(yīng)有空格,例如“#define TRUE"1"”

error C2009: reuse of macro formal 'identifier'
中文對照:(編譯錯誤)帶參宏的形式參數(shù)重復(fù)使用
分析:宏定義如有參數(shù)不能重名,例如“#define s(a,a) (a*a)”中參數(shù)a重復(fù)

error C2010: 'character' : unexpected in macro formal parameter list
中文對照:(編譯錯誤)帶參宏的形式參數(shù)表中出現(xiàn)未知字符
分析:例如“#define s(r|) r*r”中參數(shù)多了一個字符‘|'

error C2014: preprocessor command must start as first nonwhite space
中文對照:(編譯錯誤)預(yù)處理命令前面只允許空格
分析:每一條預(yù)處理命令都應(yīng)獨占一行,不應(yīng)出現(xiàn)其他非空格字符

error C2015: too many characters in constant
中文對照:(編譯錯誤)常量中包含多個字符
分析:字符型常量的單引號中只能有一個字符,或是以“\”開始的一個轉(zhuǎn)義字符,例如“char error = 'error';”

error C2017: illegal escape sequence
中文對照:(編譯錯誤)轉(zhuǎn)義字符非法
分析:一般是轉(zhuǎn)義字符位于 ' ' 或 " " 之外,例如“char error = ' '\n;”

error C2018: unknown character '0xhh'
中文對照:(編譯錯誤)未知的字符0xhh
分析:一般是輸入了中文標(biāo)點符號,例如“char error = 'E';”中“;”為中文標(biāo)點符號

error C2019: expected preprocessor directive, found 'character'
中文對照:(編譯錯誤)期待預(yù)處理命令,但有無效字符
分析:一般是預(yù)處理命令的#號后誤輸入其他無效字符,例如“#!define TRUE 1”

error C2021: expected exponent value, not 'character'
中文對照:(編譯錯誤)期待指數(shù)值,不能是字符
分析:一般是浮點數(shù)的指數(shù)表示形式有誤,例如123.456E

error C2039: 'identifier1' : is not a member of 'identifier2'
中文對照:(編譯錯誤)標(biāo)識符1不是標(biāo)識符2的成員
分析:程序錯誤地調(diào)用或引用結(jié)構(gòu)體、共用體、類的成員

error C2041: illegal digit 'x' for base 'n'
中文對照:(編譯錯誤)對于n進(jìn)制來說數(shù)字x非法
分析:一般是八進(jìn)制或十六進(jìn)制數(shù)表示錯誤,例如“int i = 081;”語句中數(shù)字‘8'不是八進(jìn)制的基數(shù)

error C2048: more than one default
中文對照:(編譯錯誤)default語句多于一個
分析:switch語句中只能有一個default,刪去多余的default

error C2050: switch expression not integral
中文對照:(編譯錯誤)switch表達(dá)式不是整型的
分析:switch表達(dá)式必須是整型(或字符型),例如“switch ("a")”中表達(dá)式為字符串,這是非法的

error C2051: case expression not constant
中文對照:(編譯錯誤)case表達(dá)式不是常量
分析:case表達(dá)式應(yīng)為常量表達(dá)式,例如“case "a"”中“"a"”為字符串,這是非法的

error C2052: 'type' : illegal type for case expression
中文對照:(編譯錯誤)case表達(dá)式類型非法
分析:case表達(dá)式必須是一個整型常量(包括字符型)

error C2057: expected constant expression
中文對照:(編譯錯誤)期待常量表達(dá)式
分析:一般是定義數(shù)組時數(shù)組長度為變量,例如“int n=10; int a[n];”中n為變量,這是非法的

error C2058: constant expression is not integral
中文對照:(編譯錯誤)常量表達(dá)式不是整數(shù)
分析:一般是定義數(shù)組時數(shù)組長度不是整型常量

error C2059: syntax error : 'xxx'
中文對照:(編譯錯誤)‘xxx'語法錯誤
分析:引起錯誤的原因很多,可能多加或少加了符號xxx

error C2064: term does not evaluate to a function
中文對照:(編譯錯誤)無法識別函數(shù)語言
分析:1、函數(shù)參數(shù)有誤,表達(dá)式可能不正確,例如“sqrt(s(s-a)(s-b)(s-c));”中表達(dá)式不正確
      2、變量與函數(shù)重名或該標(biāo)識符不是函數(shù),例如“int i,j; j=i();”中i不是函數(shù)

error C2065: 'xxx' : undeclared identifier       
中文對照:(編譯錯誤)未定義的標(biāo)識符xxx
分析:1、如果xxx為cout、cin、scanf、printf、sqrt等,則程序中包含頭文件有誤
         2、未定義變量、數(shù)組、函數(shù)原型等,注意拼寫錯誤或區(qū)分大小寫。

error C2078: too many initializers
中文對照:(編譯錯誤)初始值過多
分析:一般是數(shù)組初始化時初始值的個數(shù)大于數(shù)組長度,例如“int b[2]={1,2,3};”

error C2082: redefinition of formal parameter 'xxx'
中文對照:(編譯錯誤)重復(fù)定義形式參數(shù)xxx
分析:函數(shù)首部中的形式參數(shù)不能在函數(shù)體中再次被定義

error C2084: function 'xxx' already has a body
中文對照:(編譯錯誤)已定義函數(shù)xxx
分析:在VC++早期版本中函數(shù)不能重名,6.0版本中支持函數(shù)的重載,函數(shù)名可以相同但參數(shù)不一樣

error C2086: 'xxx' : redefinition
中文對照:(編譯錯誤)標(biāo)識符xxx重定義
分析:變量名、數(shù)組名重名

error C2087: '<Unknown>' : missing subscript
中文對照:(編譯錯誤)下標(biāo)未知
分析:一般是定義二維數(shù)組時未指定第二維的長度,例如“int a[3][];”

error C2100: illegal indirection
中文對照:(編譯錯誤)非法的間接訪問運算符“*”
分析:對非指針變量使用“*”運算

error C2105: 'operator' needs l-value
中文對照:(編譯錯誤)操作符需要左值
分析:例如“(a+b)++;”語句,“++”運算符無效

error C2106: 'operator': left operand must be l-value
中文對照:(編譯錯誤)操作符的左操作數(shù)必須是左值
分析:例如“a+b=1;”語句,“=”運算符左值必須為變量,不能是表達(dá)式

error C2110: cannot add two pointers
中文對照:(編譯錯誤)兩個指針量不能相加
分析:例如“int *pa,*pb,*a; a = pa + pb;”中兩個指針變量不能進(jìn)行“+”運算

error C2117: 'xxx' : array bounds overflow
中文對照:(編譯錯誤)數(shù)組xxx邊界溢出
分析:一般是字符數(shù)組初始化時字符串長度大于字符數(shù)組長度,例如“char str[4] = "abcd";”

error C2118: negative subscript or subscript is too large
中文對照:(編譯錯誤)下標(biāo)為負(fù)或下標(biāo)太大
分析:一般是定義數(shù)組或引用數(shù)組元素時下標(biāo)不正確

error C2124: divide or mod by zero
中文對照:(編譯錯誤)被零除或?qū)?求余
分析:例如“int i = 1 / 0;”除數(shù)為0

error C2133: 'xxx' : unknown size
中文對照:(編譯錯誤)數(shù)組xxx長度未知
分析:一般是定義數(shù)組時未初始化也未指定數(shù)組長度,例如“int a[];”

error C2137: empty character constant。
中文對照:(編譯錯誤)字符型常量為空
分析:一對單引號“''”中不能沒有任何字符

error C2143: syntax error : missing 'token1' before 'token2'
error C2146: syntax error : missing 'token1' before identifier 'identifier'
中文對照:(編譯錯誤)在標(biāo)識符或語言符號2前漏寫語言符號1
分析:可能缺少“{”、“)”或“;”等語言符號

error C2144: syntax error : missing ')' before type 'xxx'
中文對照:(編譯錯誤)在xxx類型前缺少‘)'
分析:一般是函數(shù)調(diào)用時定義了實參的類型

error C2181: illegal else without matching if
中文對照:(編譯錯誤)非法的沒有與if相匹配的else
分析:可能多加了“;”或復(fù)合語句沒有使用“{}”

error C2196: case value '0' already used
中文對照:(編譯錯誤)case值0已使用
分析:case后常量表達(dá)式的值不能重復(fù)出現(xiàn)

error C2296: '%' : illegal, left operand has type 'float'
error C2297: '%' : illegal, right operand has type 'float'
中文對照:(編譯錯誤)%運算的左(右)操作數(shù)類型為float,這是非法的
分析:求余運算的對象必須均為int類型,應(yīng)正確定義變量類型或使用強(qiáng)制類型轉(zhuǎn)換

error C2371: 'xxx' : redefinition; different basic types
中文對照:(編譯錯誤)標(biāo)識符xxx重定義;基類型不同
分析:定義變量、數(shù)組等時重名

error C2440: '=' : cannot convert from 'char [2]' to 'char'
中文對照:(編譯錯誤)賦值運算,無法從字符數(shù)組轉(zhuǎn)換為字符
分析:不能用字符串或字符數(shù)組對字符型數(shù)據(jù)賦值,更一般的情況,類型無法轉(zhuǎn)換

error C2447: missing function header (old-style formal list?)
error C2448: '<Unknown>' : function-style initializer appears to be a function definition
中文對照:(編譯錯誤)缺少函數(shù)標(biāo)題(是否是老式的形式表?)
分析:函數(shù)定義不正確,函數(shù)首部的“( )”后多了分號或者采用了老式的C語言的形參表

error C2450: switch expression of type 'xxx' is illegal
中文對照:(編譯錯誤)switch表達(dá)式為非法的xxx類型
分析:switch表達(dá)式類型應(yīng)為int或char

error C2466: cannot allocate an array of constant size 0
中文對照:(編譯錯誤)不能分配長度為0的數(shù)組
分析:一般是定義數(shù)組時數(shù)組長度為0

error C2601: 'xxx' : local function definitions are illegal
中文對照:(編譯錯誤)函數(shù)xxx定義非法
分析:一般是在一個函數(shù)的函數(shù)體中定義另一個函數(shù)

error C2632: 'type1' followed by 'type2' is illegal
中文對照:(編譯錯誤)類型1后緊接著類型2,這是非法的
分析:例如“int float i;”語句

error C2660: 'xxx' : function does not take n parameters
中文對照:(編譯錯誤)函數(shù)xxx不能帶n個參數(shù)
分析:調(diào)用函數(shù)時實參個數(shù)不對,例如“sin(x,y);”

error C2664: 'xxx' : cannot convert parameter n from 'type1' to 'type2'
中文對照:(編譯錯誤)函數(shù)xxx不能將第n個參數(shù)從類型1轉(zhuǎn)換為類型2
分析:一般是函數(shù)調(diào)用時實參與形參類型不一致

error C2676: binary '<<' : 'class istream_withassign' does not define this operator or a conversion to a type acceptable to the predefined operator
error C2676: binary '>>' : 'class ostream_withassign' does not define this operator or a conversion to a type acceptable to the predefined operator
分析:“>>”、“<<”運算符使用錯誤,例如“cin<<x; cout>>y;”

error C4716: 'xxx' : must return a value
中文對照:(編譯錯誤)函數(shù)xxx必須返回一個值
分析:僅當(dāng)函數(shù)類型為void時,才能使用沒有返回值的返回命令。

fatal error LNK1104: cannot open file "Debug/Cpp1.exe"
中文對照:(鏈接錯誤)無法打開文件Debug/Cpp1.exe
分析:重新編譯鏈接

fatal error LNK1168: cannot open Debug/Cpp1.exe for writing
中文對照:(鏈接錯誤)不能打開Debug/Cpp1.exe文件,以改寫內(nèi)容。
分析:一般是Cpp1.exe還在運行,未關(guān)閉

fatal error LNK1169: one or more multiply defined symbols found
中文對照:(鏈接錯誤)出現(xiàn)一個或更多的多重定義符號。
分析:一般與error LNK2005一同出現(xiàn)

error LNK2001: unresolved external symbol _main
中文對照:(鏈接錯誤)未處理的外部標(biāo)識main
分析:一般是main拼寫錯誤,例如“void mian()”

error LNK2005: _main already defined in Cpp1.obj
中文對照:(鏈接錯誤)main函數(shù)已經(jīng)在Cpp1.obj文件中定義
分析:未關(guān)閉上一程序的工作空間,導(dǎo)致出現(xiàn)多個main函數(shù)

warning C4003: not enough actual parameters for macro 'xxx'
中文對照:(編譯警告)宏xxx沒有足夠的實參
分析:一般是帶參宏展開時未傳入?yún)?shù)

warning C4067: unexpected tokens following preprocessor directive - expected a newline
中文對照:(編譯警告)預(yù)處理命令后出現(xiàn)意外的符號 - 期待新行
分析:“#include<iostream.h>;”命令后的“;”為多余的字符

warning C4091: '' : ignored on left of 'type' when no variable is declared
中文對照:(編譯警告)當(dāng)沒有聲明變量時忽略類型說明
分析:語句“int ;”未定義任何變量,不影響程序執(zhí)行

warning C4101: 'xxx' : unreferenced local variable
中文對照:(編譯警告)變量xxx定義了但未使用
分析:可去掉該變量的定義,不影響程序執(zhí)行

warning C4244: '=' : conversion from 'type1' to 'type2', possible loss of data
中文對照:(編譯警告)賦值運算,從數(shù)據(jù)類型1轉(zhuǎn)換為數(shù)據(jù)類型2,可能丟失數(shù)據(jù)
分析:需正確定義變量類型,數(shù)據(jù)類型1為float或double、數(shù)據(jù)類型2為int時,結(jié)果有可能不正確,數(shù)據(jù)類型1為double、數(shù)據(jù)類型2為float時,不影響程序結(jié)果,可忽略該警告

warning C4305: 'initializing' : truncation from 'const double' to 'float'
中文對照:(編譯警告)初始化,截取雙精度常量為float類型
分析:出現(xiàn)在對float類型變量賦值時,一般不影響最終結(jié)果

warning C4390: ';' : empty controlled statement found; is this the intent?
中文對照:(編譯警告)‘;'控制語句為空語句,是程序的意圖嗎?
分析:if語句的分支或循環(huán)控制語句的循環(huán)體為空語句,一般是多加了“;”

warning C4508: 'xxx' : function should return a value; 'void' return type assumed
中文對照:(編譯警告)函數(shù)xxx應(yīng)有返回值,假定返回類型為void
分析:一般是未定義main函數(shù)的類型為void,不影響程序執(zhí)行

warning C4552: 'operator' : operator has no effect; expected operator with side-effect
中文對照:(編譯警告)運算符無效果;期待副作用的操作符
分析:例如“i+j;”語句,“+”運算無意義

warning C4553: '==' : operator has no effect; did you intend '='?
中文對照:(編譯警告)“==”運算符無效;是否為“=”?
分析:例如 “i==j;” 語句,“==”運算無意義

warning C4700: local variable 'xxx' used without having been initialized
中文對照:(編譯警告)變量xxx在使用前未初始化
分析:變量未賦值,結(jié)果有可能不正確,如果變量通過scanf函數(shù)賦值,則有可能漏寫“&”運算符,或變量通過cin賦值,語句有誤

warning C4715: 'xxx' : not all control paths return a value
中文對照:(編譯警告)函數(shù)xxx不是所有的控制路徑都有返回值
分析:一般是在函數(shù)的if語句中包含return語句,當(dāng)if語句的條件不成立時沒有返回值
warning C4723: potential divide by 0

中文對照:(編譯警告)有可能被0除
分析:表達(dá)式值為0時不能作為除數(shù)

warning C4804: '<' : unsafe use of type 'bool' in operation
中文對照:(編譯警告)‘<':不安全的布爾類型的使用
分析:例如關(guān)系表達(dá)式“0<=x<10”有可能引起邏輯錯誤

上一篇:深入剖析C++中的struct結(jié)構(gòu)體字節(jié)對齊

欄    目:C語言

下一篇:C語言求圓周率的簡單實現(xiàn)方法

本文標(biāo)題:C++常見錯誤中英文對照表

本文地址:http://mengdiqiu.com.cn/a1/Cyuyan/2299.html

網(wǎng)頁制作CMS教程網(wǎng)絡(luò)編程軟件編程腳本語言數(shù)據(jù)庫服務(wù)器

如果侵犯了您的權(quán)利,請與我們聯(lián)系,我們將在24小時內(nèi)進(jìn)行處理、任何非本站因素導(dǎo)致的法律后果,本站均不負(fù)任何責(zé)任。

聯(lián)系QQ:835971066 | 郵箱:835971066#qq.com(#換成@)

Copyright © 2002-2020 腳本教程網(wǎng) 版權(quán)所有