If you use a compiler like Clang, then there's no need since Clang can compile several different programming languages. If you write a C++ source file, then invoke the C++ compiler within Clang at the command line. C++ compilers are able to compile C source files though since C++ was designed to be a superset of C.
vishnu
2015-07-10 07:53:10 UTC
Nope. As C++ is the newer version , you just can't compile a C++ code in C Compiler as keywords,tokens are differently defined.
no1home2day
2015-07-10 07:50:11 UTC
Which compiler do you want to use? I mean, if it's Visual Studio, then yes. If it's a stand-alone compiler in which you enter the name, then you cannot.
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.