就只调用了printf函数打印了一句话,里面包括中文,结果乱码了。
网上说的这个解决方法并不管用:
包含头文件:#include <locale.h>
函数:_tsetlocale(LC_ALL, _T("chs"));
伊谢尔伦2017-04-17 13:32:18
Please confirm the encoding format of the .cpp file where your code is located (the file created by vs should be ANSI, but if your file is created in other ways, it may not be ANSI) and your console (windows defaults to ANSI ) encoding format, these two formats need to be consistent.