Visual Studio 2010 compiles .cpp files as .c files

I am working on a Visual Studio solution that was created using CMake (not sure if this is relevant).

There is a c file in this solution, I wanted to change it to a cpp file, so I renamed it and changed the extension.

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

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

+7
source share
1 answer

Project Properties, Configuration, C / C ++, Advanced, change β€œCompile As”.

+10
source

All Articles