c/c++ 宽字符转多字节 #include <iostream> #include<Windows.h> int main() { char cBuf[30]; TCHAR tBuf[30]=L"ni hao 你给老六"; memset(cBuf, 0, sizeof(cBuf)); WideCharToMultiByte(CP_ACP, NULL, tBuf, _countof(tBuf), cBuf, sizeof(cBuf),0,0);//对照AP_ACP代码也。其他请跟踪文件里的预定义 printf_s("%s", cBuf); }