好友
阅读权限10
听众
最后登录1970-1-1
|
帝爵
发表于 2015-5-8 04:30
# include <stdio.h>
int main(void)
{
int i;
i = 3;
printf(“i = %d\n”,i);
return 0;
}
这段 我写错了么 用VC++ 调试出错
小白求指教
错误代码:
--------------------Configuration: 变量 - Win32 Debug--------------------
Compiling...
变量.cpp
E:\C实验\变量.cpp(5) : error C2018: unknown character '0xa3'
E:\C实验\变量.cpp(5) : error C2018: unknown character '0xbb'
E:\C实验\变量.cpp(6) : error C2146: syntax error : missing ';' before identifier 'i'
E:\C实验\变量.cpp(6) : error C2018: unknown character '0xa3'
E:\C实验\变量.cpp(6) : error C2018: unknown character '0xbb'
E:\C实验\变量.cpp(7) : error C2146: syntax error : missing ';' before identifier 'printf'
E:\C实验\变量.cpp(7) : error C2018: unknown character '0xa1'
E:\C实验\变量.cpp(7) : error C2018: unknown character '0xb0'
E:\C实验\变量.cpp(7) : error C2018: unknown character '0xa3'
E:\C实验\变量.cpp(7) : error C2018: unknown character '0xa5'
E:\C实验\变量.cpp(7) : error C2017: illegal escape sequence
E:\C实验\变量.cpp(7) : error C2065: 'd' : undeclared identifier
E:\C实验\变量.cpp(7) : error C2018: unknown character '0xa1'
E:\C实验\变量.cpp(7) : error C2018: unknown character '0xb1'
E:\C实验\变量.cpp(7) : error C2018: unknown character '0xa3'
E:\C实验\变量.cpp(7) : error C2018: unknown character '0xac'
E:\C实验\变量.cpp(7) : error C2146: syntax error : missing ')' before identifier 'n'
E:\C实验\变量.cpp(7) : error C2664: 'printf' : cannot convert parameter 1 from 'int' to 'const char *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
E:\C实验\变量.cpp(7) : error C2059: syntax error : ')'
E:\C实验\变量.cpp(7) : error C2018: unknown character '0xa3'
E:\C实验\变量.cpp(7) : error C2018: unknown character '0xbb'
E:\C实验\变量.cpp(8) : error C2018: unknown character '0xa3'
E:\C实验\变量.cpp(8) : error C2018: unknown character '0xbb'
E:\C实验\变量.cpp(9) : warning C4508: 'main' : function should return a value; 'void' return type assumed
执行 cl.exe 时出错.
变量.exe - 1 error(s), 0 warning(s)
|
|
发帖前要善用【论坛搜索】功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。 |
|
|
|
|