恒美微站
首页
关于我们
建站服务
主题模板
案例展示
资讯中心
联系我们
Hello World and Test
首页
资讯中心
/
Hello World and Test
Hello World and Test
发布时间:2026/8/28 5:56:12
学习C语言,探索并解决打印时一些额外问题.若直接输入#includestdio.hintmain(){printf(你好世界\n);printf(hello world);return0;}那么中文将不能正常输出,变为乱码,而下面的代码#includestdio.h#includeWindows.h//引入另一种头函数intmain(){SetConsoleOutputCP(CP_UTF8);//统一输出为utf8printf(你好世界\n);printf(hello world);return0;}能解决输出时候中文乱码的问题统一输出为utf8