command line option "-std=c++0x" is valid for C++/ObjC++ but not for C...what is this about?
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).
I got it as a warning when I compiled a C program, what's C++ standard got to do with a C program??
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...
||warning: command line option "-std=c++0x" is valid for C++/ObjC++ but not for C| ||=== Build finished: 0 errors, 1 warnings ===|
why wud d compiler enforce it on a C program?
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++
Join our real-time social learning platform and learn together with your friends!