ARTICLE DETAIL

资讯详情

深耕郑州网站建设与运营推广的一线实战洞察。

Hello World and Test

Hello World and Test 学习C语言,探索并解决打印时一些额外问题.若直接输入#includestdio.hintmain(){printf(你好世界\n);printf(hello world);return0;}那么中文将不能正常输出,变为乱码,而下面的代码#includestdio.h#includeWindows.h//引入另一种头函数intmain(){SetConsoleOutputCP(CP_UTF8);//统一输出为utf8printf(你好世界\n);printf(hello world);return0;}能解决输出时候中文乱码的问题统一输出为utf8
返回列表