wstring包含汉字,wcout输出,需要设置一下: wstring wstr2=Ansi_To_Unicode(str2); wcout.imbue(locale("chs")); wcout<<wstr2<<endl;