On Mar 5, 3:40*pm, David Lowndes <Dav...@example.invalidwrote:
Is there a way to keep my extensions .c, but tell VSC++ (through an
project option) to compile as C++98 code (as if it had .cpp
extensions).
Have a look at the /TC and /TP options.
Dave
Opse sorry. I forgot to mention I seen the "Project Properties >
Configuration Properties C/C++ Advanced Compile As" which has
the options:
Compile as C++ (/TP)
Compile as C Code (/TC)
The project is defaulted to /TP (no matter if the extention is .c
or .cpp). Even with /TP set, if the file extentions are all .c it
wont compile. Renaming the files (inside the solution explorer)
without changing any of the project properties (from .c to .cpp) makes
it compile.
As a result it doesn't look like this setting does anything for me
(and the extention on the files are what's dictating compile type). I
was hoping for another property someplace (something like ignore file
extention) kinda thing; or another work-around; or maybe I'm just
using the "Compile As" incorrectly?
Thanks, NB