我在VC 6.0编译有错误 不知道是那个
# include <stdio.h>int main(void)
{
if (3 > 2)
printf(“AAA\n”);
else
printf(“BBB\n”);
printf(“CCC\n”);
return 0;
}
提示有1个错误但不知道是哪里错了
无邪 发表于 2014-8-6 19:50
代码没有问题,你把出错的提示贴出来看一下
--------------------Configuration: laikk - Win32 Debug--------------------
Compiling...
qe.cpp
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(1) : error C2018: unknown character '0xa3'
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(1) : error C2018: unknown character '0xa3'
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(1) : error C2143: syntax error : missing ';' before '<'
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(1) : error C2501: 'include' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(1) : error C2143: syntax error : missing ';' before '<'
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(4) : error C2143: syntax error : missing ';' before '{'
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(4) : error C2447: missing function header (old-style formal list?)
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(6) : error C2018: unknown character '0xa1'
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(6) : error C2018: unknown character '0xb0'
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(6) : error C2017: illegal escape sequence
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(6) : error C2018: unknown character '0xa1'
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(6) : error C2018: unknown character '0xb1'
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(6) : error C2018: unknown character '0xa3'
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(6) : error C2018: unknown character '0xbb'
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(8) : error C2018: unknown character '0xa1'
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(8) : error C2018: unknown character '0xb0'
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(8) : error C2017: illegal escape sequence
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(8) : error C2018: unknown character '0xa1'
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(8) : error C2018: unknown character '0xb1'
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(8) : error C2018: unknown character '0xa3'
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(8) : error C2018: unknown character '0xbb'
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(10) : error C2018: unknown character '0xa1'
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(10) : error C2018: unknown character '0xb0'
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(10) : error C2017: illegal escape sequence
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(10) : error C2018: unknown character '0xa1'
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(10) : error C2018: unknown character '0xb1'
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(10) : error C2018: unknown character '0xa3'
C:\Program Files\Microsoft Visual Studio\MyProjects\laikk\qe.cpp(10) : error C2018: unknown character '0xbb'
执行 cl.exe 时出错.
laikk.exe - 1 error(s), 0 warning(s)
判断木有结束吧! psx_810 发表于 2014-8-6 19:06
判断木有结束吧!
恩 说什么这个文件是MOT存在.你想建立它吗? 不明觉厉啊,不懂vc的路过 代码没有问题,你把出错的提示贴出来看一下 丿追逐 发表于 2014-8-6 19:57
--------------------Configuration: laikk - Win32 Debug--------------------
Compiling...
qe.cpp
都跟你说了,把中文符号改为英文符号。{:301_999:} 代码没得问题,不防贴下错误提示,初步怀疑楼主是否标点符号用的不是英文下的 自己选中符号看下就知道了,中文符号选中后黑影部分是正方形,英文符号选中后是长方形。