vc++里边汉字输入不会
#include<stdio.h>
int main()
{
char a[6]={小明},b[6];
print("Please enter your name!\n");
scanf("%c%c%c",&b[0],&b[1],&b[2]);
if(a[0]==b[0]&&a[1]==b[1])
printf("welcome to you!\n");
else
printf("Get out!\n");
return 0;
}
--------------------Configuration: 6 - Win32 Debug--------------------
Compiling...
6.c
C:\Users\Administrator\Desktop\办公\6.c(4) : error C2018: unknown character '0xc5'
C:\Users\Administrator\Desktop\办公\6.c(4) : error C2018: unknown character '0xcb'
C:\Users\Administrator\Desktop\办公\6.c(4) : error C2059: syntax error : ','
C:\Users\Administrator\Desktop\办公\6.c(4) : error C2018: unknown character '0xcb'
C:\Users\Administrator\Desktop\办公\6.c(4) : error C2018: unknown character '0xc9'
C:\Users\Administrator\Desktop\办公\6.c(4) : error C2018: unknown character '0xe9'
C:\Users\Administrator\Desktop\办公\6.c(4) : error C2018: unknown character '0xaa'
C:\Users\Administrator\Desktop\办公\6.c(5) : warning C4013: 'print' undefined; assuming extern returning int
C:\Users\Administrator\Desktop\办公\6.c(6) : error C2065: 'b' : undeclared identifier
C:\Users\Administrator\Desktop\办公\6.c(6) : error C2109: subscript requires array or pointer type
C:\Users\Administrator\Desktop\办公\6.c(6) : error C2102: '&' requires l-value
C:\Users\Administrator\Desktop\办公\6.c(6) : error C2109: subscript requires array or pointer type
C:\Users\Administrator\Desktop\办公\6.c(6) : error C2102: '&' requires l-value
C:\Users\Administrator\Desktop\办公\6.c(6) : error C2109: subscript requires array or pointer type
C:\Users\Administrator\Desktop\办公\6.c(6) : error C2102: '&' requires l-value
C:\Users\Administrator\Desktop\办公\6.c(7) : error C2109: subscript requires array or pointer type
执行 cl.exe 时出错.
6.exe - 1 error(s), 0 warning(s)