May 10, 2013 at 9:48am UTC
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++
May 10, 2013 at 9:50am UTC
I'm thinking he may be using gcc instead of g++. Will gcc deduce which compiler to use depending on file extension?
May 10, 2013 at 10:01am UTC
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.
May 10, 2013 at 10:22am UTC
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,
Maulus
Last edited on May 10, 2013 at 10:24am UTC
May 10, 2013 at 10:42am UTC
Mark this post as "Solved" on the top of this page to avoid more comments from readers.