错误
#include <windows.h>
#include <stdio.h>
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPreINstance,PSTR szCmdLine,int iCmdShow)
{
int iLength = 0;
char * pc = "Hello!";
iLength = strlen(pc);
wchar_t * pw = L"Hello!";
iLength = wcslen(pw);
return 0;
}
错误 1
error C2275: “wchar_t”: 将此类型用作表达式非法 正确
#include <windows.h>
#include <stdio.h>
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPreINstance,PSTR szCmdLine,int iCmdShow)
{
int iLength = 0;
char * pc = "Hello!";
wchar_t * pw = L"Hello!";
iLength = strlen(pc);
iLength = wcslen(pw);
return 0;
}
这种错误来的莫名其妙