wprintf 输出中文

//  使用wprintf输出中文时,需调用setlocale(LC_CTYPE, ""); 将输出字符集设置为本地字符集

setlocale(LC_CTYPE, "");    //  设为本地字符集

…… 

setlocale(LC_CTYPE, "C");  //  恢复默认值

PS: 

下列函数不需要调用setlocale:

    wsprintfW()  //  include <Windows.h>

    swprintf()    //  include <stdio.h>

    MultiByteToWideChar   //  include <Windows.h>

原文地址:https://www.cnblogs.com/ant-wjf/p/3272805.html