编译时可以显示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;
}

解决方案 »

  1.   

    晕了,改成下面的样子确好使。
    int _tmain(int argc, _TCHAR* argv[])
    {
             MessageBox(NULL,_TEXT("我爱中国"),_TEXT("我爱中国"),MB_OK); getchar();
    return 0;
    }
      

  2.   

    是不是定义了_UNICODE但是没有定义UNICODE?再检查一下~
      

  3.   

    新建WIN32 CONSOLE 工程,在工程设置中的C++选项下PreProcessor加上_UNICODE#include "stdafx.h"
    #include "tchar.h"
    #include "stdio.h"int main(int argc, char* argv[])
    {
       _tprintf(_TEXT("%s"),_TEXT("中国"));
       _tprintf(_TEXT("%s"),_TEXT("a"));
       getchar();
       return 0;
    }