VS使用utf-8 no bom时编译报错的一个解决方案

Set the option in Visual Studio or programmatically

To set this compiler option in the Visual Studio development environment

  1. Open the project Property Pages dialog box. For more information, see Set C++ compiler and build properties in Visual Studio.

  2. Select the Configuration Properties > C/C++ > Command Line property page.

  3. In Additional Options, add the /utf-8 option to specify your preferred encoding.

  4. Choose OK to save your changes.

原文地址:https://www.cnblogs.com/nuoforever/p/15217179.html