Ask your own question, for FREE!
Computer Science 18 Online
OpenStudy (anonymous):

command line option "-std=c++0x" is valid for C++/ObjC++ but not for C...what is this about?

OpenStudy (anonymous):

It's C++, not C. It enables C++0x support ( http://gcc.gnu.org/projects/cxx0x.html ). C++0x was the formerly used name of the new C++11 standard (approved by ISO on 12 August 2011).

OpenStudy (anonymous):

I got it as a warning when I compiled a C program, what's C++ standard got to do with a C program??

OpenStudy (anonymous):

Can you give me the warning message or the complete gcc call? I have never tried it but I would say it shouldn't have an effect in compiling a C program. It only activates support for another standard of C++. It's senseless to use it in compiling a C program, actually...

OpenStudy (anonymous):

||warning: command line option "-std=c++0x" is valid for C++/ObjC++ but not for C| ||=== Build finished: 0 errors, 1 warnings ===|

OpenStudy (anonymous):

why wud d compiler enforce it on a C program?

OpenStudy (anonymous):

For C++ you should usually use the g++ command (GNU C++ compiler). You can use it because the gcc command also allows you to compile C++ programs with the -x option: gcc -x c++

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!