资源来自http://bbs.chinaunix.net/viewthread.php?tid=1083940
自己整理如下
C++
#include <iostream> |
C
#include <stdio.h> #include <stdlib.h> #include <locale.h> #include <wchar.h> int main(void) { wchar_t w[] = L"Out中文"; setlocale(LC_ALL, "zh_CN.UTF-8"); wprintf(L"%ls/n", w); return 0; } |