1. VS下字符集经常会出现中文乱码问题,注意几点即可: 在cpp文件中设置编码字符集,只在VS编译器下生效 #if _MSC_VER >= 1600 #pragma execution_character_set("utf-8") #endif