开发者

Visual Studio 2010 compiling .cpp files as .c files

开发者 https://www.devze.com 2023-02-18 20:35 出处:网络
I\'m working one a Visual Studio solution which was generated using CMake (not sure 开发者_如何转开发if this is relevant).

I'm working one a Visual Studio solution which was generated using CMake (not sure 开发者_如何转开发if this is relevant).

In this solution there a c file, I wanted to change it into a cpp file, so I renamed it and changed the extension.

However, Visual Studio still treats it like a c file and gives compiler errors whenever I add any c++ style code.

I'm stuck, any advice would be much appreciated.


Project Properties, Configuration, C/C++, Advanced, change "Compile As".

0

精彩评论

暂无评论...
验证码 换一张
取 消