请大家帮我看看这段小程序有没有错误(宽字符)
程序代码:
#include <windows.h> #include <iostream.h> void main() { wchar_t a='A'; cout<<sizeof(a)<<endl; wchar_t* p=L"Hello!"; cout<<sizeof(p)<<endl; static wchar_t b[]=L"Hello!"; cout<<sizeof(b)<<endl; }编译器提示
D:\ProgramFiles\Microsoft Visual Studio\myprojects2\宽字符\宽字符.cpp(5) : error C2018: unknown character '0xa1'
D:\ProgramFiles\Microsoft Visual Studio\myprojects2\宽字符\宽字符.cpp(5) : error C2018: unknown character '0xa1'
D:\ProgramFiles\Microsoft Visual Studio\myprojects2\宽字符\宽字符.cpp(6) : error C2018: unknown character '0xa1'
D:\ProgramFiles\Microsoft Visual Studio\myprojects2\宽字符\宽字符.cpp(6) : error C2018: unknown character '0xa1'
D:\ProgramFiles\Microsoft Visual Studio\myprojects2\宽字符\宽字符.cpp(7) : error C2018: unknown character '0xa1'
D:\ProgramFiles\Microsoft Visual Studio\myprojects2\宽字符\宽字符.cpp(7) : error C2018: unknown character '0xa1'
D:\ProgramFiles\Microsoft Visual Studio\myprojects2\宽字符\宽字符.cpp(8) : error C2018: unknown character '0xa1'
D:\ProgramFiles\Microsoft Visual Studio\myprojects2\宽字符\宽字符.cpp(8) : error C2018: unknown character '0xa1'
D:\ProgramFiles\Microsoft Visual Studio\myprojects2\宽字符\宽字符.cpp(9) : error C2018: unknown character '0xa1'
D:\ProgramFiles\Microsoft Visual Studio\myprojects2\宽字符\宽字符.cpp(9) : error C2018: unknown character '0xa1'
D:\ProgramFiles\Microsoft Visual Studio\myprojects2\宽字符\宽字符.cpp(10) : error C2018: unknown character '0xa1'
D:\ProgramFiles\Microsoft Visual Studio\myprojects2\宽字符\宽字符.cpp(10) : error C2018: unknown character '0xa1'
执行 cl.exe 时出错.
我不知道是怎么回事