#include <iostream>
#include <Windows.h>
// 使用此函數輸出寬字符變量
// 普通字符串請直接用cout輸出
inline void echo(HANDLE hOut, LPWSTR wstr)
{
    WriteConsoleW(hOut, wstr, wcslen(wstr), NULL, NULL);
}
void main()
{
    HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
    echo(hOut, L"abc簡體中文");
    std::cout << std::endl;
    echo(hOut, L"田中さんにあげて下さい");
    std::cout << std::endl;
    echo(hOut, L"اللغة العربية"); // 這個無法顯示。。。
    std::cout << std::endl;
    echo(hOut, L"¿Cómo estás?");
    std::cout << std::endl;
    system("pause");
}
      
