编译时可以显示This is unicode application!的。
但屏幕上只显示一个“a”。
我的系统是中文2000 server(和这个有关系吗?-_-~ )
#include "stdafx.h"
#include <stdio.h>
#include <tchar.h>
#include <windows.h>#if defined (_UNICODE) || (UNICODE)
#pragma message("This is unicode application!")
#endifint _tmain(int argc, _TCHAR* argv[])
{
wprintf(_TEXT("中"));
wprintf(_TEXT("a")); getchar();
return 0;
}
但屏幕上只显示一个“a”。
我的系统是中文2000 server(和这个有关系吗?-_-~ )
#include "stdafx.h"
#include <stdio.h>
#include <tchar.h>
#include <windows.h>#if defined (_UNICODE) || (UNICODE)
#pragma message("This is unicode application!")
#endifint _tmain(int argc, _TCHAR* argv[])
{
wprintf(_TEXT("中"));
wprintf(_TEXT("a")); getchar();
return 0;
}
int _tmain(int argc, _TCHAR* argv[])
{
MessageBox(NULL,_TEXT("我爱中国"),_TEXT("我爱中国"),MB_OK); getchar();
return 0;
}
#include "tchar.h"
#include "stdio.h"int main(int argc, char* argv[])
{
_tprintf(_TEXT("%s"),_TEXT("中国"));
_tprintf(_TEXT("%s"),_TEXT("a"));
getchar();
return 0;
}