vc6.0中常见错误提示信息

利用vc6.0进行源代码的编辑是经常遇到的问题,可参考使用。

Visual C++常见错误信息

VC编译出错时会指示出程序错误的位置,鼠标双击出错信息行,就可以实现错误的定位。

1、fatal error C1083: Cannot open include file: 'R…….h': No such file or directory

不能打开包含文件“R…….h”:没有这样的文件或目录。

2、error C2018: unknown character '0xa3'

不认识的字符'0xa3'。(一般是汉字或中文标点符号)

3. fatal error C1004: unexpected end of file found

源文件的 { 与 } 不匹配。

4、error C2057: expected constant expression

希望是常量表达式。(一般出现在switch语句的case分支中)

5、error C2065: 'abc' : undeclared identifier

“abc”:标识符没定义,有两种可能,一是未定义;二是在引用时标识符的名字写错了。

6、LINK : fatal error LNK1168: cannot open Debug/P1.exe for writing

连接错误:不能打开P1.exe文件,以改写内容。(一般是P1.Exe还在运行,未关闭)

7、warning C4700: local variable 'bReset' used without having been initialized 局部变量“bReset”没有初始化就使用。

8、 C2001: newline in constant

This error is usually caused by a string or character constant that is missing its closing ' or " symbol

9、error C2084: function 'void __cdecl main(void)' already has a body

在一个源文件中定义了两个main函数。初学者易犯的错误。一个程序完成后,没有关闭相应的源文件,接着,在下面又编辑了另一个程序,把两个不相关的程序放在一个源文件中。

10、error C2143: syntax error: missing ':' before '{'

句法错误:“{”前缺少“;”。

11、error C2146: syntax error : missing ';' before identifier 'dc' 句法错误:在“dc”前丢了“;”。

12、error C2196: case value '69' already used

值69已经用过。(一般出现在switch语句的case分支中)

13、error C2660: 'SetTimer' : function does not take 2 parameters “SetTimer”函数不传递2个参数。

vc6.0中常见错误提示信息相关文档

最新文档

返回顶部