|If they all had the correct extension, then you would have .C files for pure C code (no C++ inside) and .CPP files with C++ code. Any .h header files included by .C files will also have pure C (not C++) code. If that was the case, you would not need the /TP flag, and all your code would compile with no errors.|
Also, even for an application that is written in a mixture of C and C++, you don't have to compile all code as C++. Just compile your C code as C, and your C++ code as C++. But make sure main() is in C++. Then link all your .obj files together into an executable.