Strange errors "hello world" program

Pages: 12
Most compilers will deduce the type of file depending on the extension, .c is usually considered to be C and is compiled as such. .cpp is compiled as C++
I'm thinking he may be using gcc instead of g++. Will gcc deduce which compiler to use depending on file extension?
Code::Blocks detect your extensions:

Using .c files it will compile for C
Using .cpp files it wil compile for C++

And C does not have iostream neither std::cout.

So rename main.c to main.cpp.
it is finaly working, besides using the wrong extension .c, i allso used a "empty project".

iam now using the little gear next to the run button aswell.

i thank you all very much for the help and fast reply's!!!!!!!!!!!!

Kind Regards,

Last edited on
Mark this post as "Solved" on the top of this page to avoid more comments from readers.
Topic archived. No new replies allowed.
Pages: 12