c++无编号编译错误中英文对照表 联系客服

发布时间 : 星期三 文章c++无编号编译错误中英文对照表更新完毕开始阅读

中文对照:(编译错误)赋值运算,无法从字符数组转换为字符

分析:不能用字符串或字符数组对字符型数据赋值,更一般的情况,类型无法转换 missing function header (old-style formal list?)

'' : function-style initializer appears to be a function definition

中文对照:(编译错误)缺少函数标题(是否是老式的形式表?)

分析:函数定义不正确,函数首部的“( )”后多了分号或者采用了老式的C语言的形参表

switch expression of type 'xxx' is illegal

中文对照:(编译错误)switch表达式为非法的xxx类型 分析:switch表达式类型应为int或char

cannot allocate an array of constant size 0 中文对照:(编译错误)不能分配长度为0的数组 分析:一般是定义数组时数组长度为0

'xxx' : local function definitions are illegal 中文对照:(编译错误)函数xxx定义非法

分析:一般是在一个函数的函数体中定义另一个函数 'type1' followed by 'type2' is illegal

中文对照:(编译错误)类型1后紧接着类型2,这是非法的 分析:例如“int float i;”语句

'xxx' : function does not take n parameters 中文对照:(编译错误)函数xxx不能带n个参数 分析:调用函数时实参个数不对,例如“sin(x,y);”

'xxx' : cannot convert parameter n from 'type1' to 'type2'

中文对照:(编译错误)函数xxx不能将第n个参数从类型1转换为类型2 分析:一般是函数调用时实参与形参类型不一致

binary '<<' : 'class istream_withassign' does not define this operator or a conversion to a type acceptable to the predefined operator

binary '>>' : 'class ostream_withassign' does not define this operator or a conversion to a type acceptable to the predefined operator 分析:“>>”、“<<”运算符使用错误,例如“cin<>y;” 'xxx' : must return a value

中文对照:(编译错误)函数xxx必须返回一个值

分析:仅当函数类型为void时,才能使用没有返回值的返回命令。 cannot open file \

中文对照:(链接错误)无法打开文件Debug/Cpp1.exe 分析:重新编译链接

cannot open Debug/Cpp1.exe for writing

中文对照:(链接错误)不能打开Debug/Cpp1.exe文件,以改写内容。 分析:一般是Cpp1.exe还在运行,未关闭

one or more multiply defined symbols found

中文对照:(链接错误)出现一个或更多的多重定义符号。 分析:一般与error LNK2005一同出现 unresolved external symbol _main

中文对照:(链接错误)未处理的外部标识main 分析:一般是main拼写错误,例如“void mian()” main already defined in Cpp1.obj

中文对照:(链接错误)main函数已经在Cpp1.obj文件中定义 分析:未关闭上一程序的工作空间,导致出现多个main函数 not enough actual parameters for macro 'xxx' 中文对照:(编译警告)宏xxx没有足够的实参 分析:一般是带参宏展开时未传入参数

unexpected tokens following preprocessor directive - expected a newline 中文对照:(编译警告)预处理命令后出现意外的符号 - 期待新行 分析:“#include;”命令后的“;”为多余的字符 '' : ignored on left of 'type' when no variable is declared 中文对照:(编译警告)当没有声明变量时忽略类型说明 分析:语句“int ;”未定义任何变量,不影响程序执行 'xxx' : unreferenced local variable

中文对照:(编译警告)变量xxx定义了但未使用 分析:可去掉该变量的定义,不影响程序执行

'=' : conversion from 'type1' to 'type2', possible loss of data

中文对照:(编译警告)赋值运算,从数据类型1转换为数据类型2,可能丢失数据

分析:需正确定义变量类型,数据类型1为float或double、数据类型2为int时,结果有可能不正确,数据类型1为double、数据类型2为float时,不影响程序结果,可忽略该警告

'initializing' : truncation from 'const double' to 'float' 中文对照:(编译警告)初始化,截取双精度常量为float类型 分析:出现在对float类型变量赋值时,一般不影响最终结果

';' : empty controlled statement found; is this the intent? 中文对照:(编译警告)‘;’控制语句为空语句,是程序的意图吗?

分析:if语句的分支或循环控制语句的循环体为空语句,一般是多加了“;” 'xxx' : function should return a value; 'void' return type assumed 中文对照:(编译警告)函数xxx应有返回值,假定返回类型为void 分析:一般是未定义main函数的类型为void,不影响程序执行

'operator' : operator has no effect; expected operator with side-effect 中文对照:(编译警告)运算符无效果;期待副作用的操作符 分析:例如“i+j;”语句,“+”运算无意义

'==' : operator has no effect; did you intend '='?

中文对照:(编译警告)“==”运算符无效;是否为“=”? 分析:例如 “i==j;” 语句,“==”运算无意义

local variable 'xxx' used without having been initialized 中文对照:(编译警告)变量xxx在使用前未初始化

分析:变量未赋值,结果有可能不正确,如果变量通过scanf函数赋值,则有可能漏写“&”运算符,或变量通过cin赋值,语句有误 'xxx' : not all control paths return a value

中文对照:(编译警告)函数xxx不是所有的控制路径都有返回值

分析:一般是在函数的if语句中包含return语句,当if语句的条件不成立时没有返回值

potential divide by 0

中文对照:(编译警告)有可能被0除 分析:表达式值为0时不能作为除数

'<' : unsafe use of type 'bool' in operation

中文对照:(编译警告)‘<’:不安全的布尔类型的使用 分析:例如关系表达式“0<=x<10”有可能引起逻辑错误