std::wcout.imbue( std::locale(std::locale(),"",std::locale::ctype) );
[此贴子已经被作者于2022-6-12 06:10编辑过]
#include <iostream> using namespace std; #include <io.h> #include <fcntl.h> int main( void ) { //setlocale( LC_ALL, "" ); _setmode( _fileno(stdout), _O_WTEXT ); wcout << L"汉字" << endl; }