为什么会这样?
#include <stdio.h>main()
{int i,j=0;
while((i=getchar())!=EOF)
if (i=='\n')
++j;
printf("%d",j);
}
--------------------Configuration: get - Win32 Debug--------------------
Compiling...
get.cpp
E:\语言代码\get.cpp(3) : error C2018: unknown character '0xa3'
E:\语言代码\get.cpp(3) : error C2018: unknown character '0xac'
E:\语言代码\get.cpp(3) : error C2146: syntax error : missing ';' before identifier 'j'
E:\语言代码\get.cpp(3) : error C2065: 'j' : undeclared identifier
E:\语言代码\get.cpp(8) : warning C4508: 'main' : function should return a value; 'void' return type assumed
执行 cl.exe 时出错.
get.exe - 1 error(s), 0 warning(s)