So, im using codeblocks to write C++ and i have MinGW, but for some reason, it wont compile the first program in the tutorial... any one know whats wrong with it and how i can fix it? Thanks for your time.
i dont think its the compiler, here is the build errors i get:
C:\Users\Jonathan\Desktop\C++\Shutdown Commander\Shutdown Commander\Shutdown Commander.c|1|error: iostream: No such file or directory|
C:\Users\Jonathan\Desktop\C++\Shutdown Commander\Shutdown Commander\Shutdown Commander.c|2|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'namespace'|
C:\Users\Jonathan\Desktop\C++\Shutdown Commander\Shutdown Commander\Shutdown Commander.c||In function 'main':|
C:\Users\Jonathan\Desktop\C++\Shutdown Commander\Shutdown Commander\Shutdown Commander.c|6|error: 'cout' undeclared (first use in this function)|
C:\Users\Jonathan\Desktop\C++\Shutdown Commander\Shutdown Commander\Shutdown Commander.c|6|error: (Each undeclared identifier is reported only once|
C:\Users\Jonathan\Desktop\C++\Shutdown Commander\Shutdown Commander\Shutdown Commander.c|6|error: for each function it appears in.)|
||=== Build finished: 5 errors, 0 warnings ===|
so.... yeah... and heres is what i "ran"
1 2 3 4 5 6 7 8
|
#include <iostream>
using namespace std;
int main ()
{
cout<< "Hello World!!";
return 0;
}
|
it's supposed to be "hello world!" program to introduce me to C++, but it's not working for some reason.