中文对照:(编译警告)预处理命令后出现意外的符号 - 期待新行
分析:“#include<iostream.h>;”命令后的“;”为多余的字符
warning C4091: '' : ignored on left of 'type' when no variable is declared
中文对照:(编译警告)当没有声明变量时忽略类型说明
分析:语句“int ;”未定义任何变量,不影响程序执行
warning C4101: 'xxx' : unreferenced local variable
中文对照:(编译警告)变量xxx定义了但未使用
分析:可去掉该变量的定义,不影响程序执行
warning C4244: '=' : conversion from 'type1' to 'type2', possible loss of data
中文对照:(编译警告)赋值运算,从数据类型1转换为数据类型2,可能丢失数据
分析:需正确定义变量类型,数据类型1为float或double、数据类型2为int时,结果有可能不正确,数据类型1为double、数据类型2为float时,不影响程序结果,可忽略该警告
warning C4305: 'initializing' : truncation from 'const double' to 'float'
中文对照:(编译警告)初始化,截取双精度常量为float类型
分析:出现在对float类型变量赋值时,一般不影响最终结果
warning C4390: ';' : empty controlled statement found; is this the intent?
中文对照:(编译警告)‘;'控制语句为空语句,是程序的意图吗?
分析:if语句的分支或循环控制语句的循环体为空语句,一般是多加了“;”
warning C4508: 'xxx' : function should return a value; 'void' return type assumed
中文对照:(编译警告)函数xxx应有返回值,假定返回类型为void
分析:一般是未定义main函数的类型为void,不影响程序执行
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在使用前未初始化










