用wcout输出有汉字的wstring

必须要加入这条语句才可以输出汉字

wcout.imbue(std::locale(“chs”));//必须加这一句,才能输出有汉字的wstring。

wcout 不能用来输出 string对象。

cout 也不能用来输出 wstring 对象。

猜你喜欢

转载自blog.csdn.net/qq_23350817/article/details/103736576