I am writing a c++ code (or any sort of code for that matter) after one complete year. And yet I don't think I could have become so bad that I can't make a Hello World program. Still, here I am with so many errors.
Here's the code:-
#include <iostream>
using namespace std;
int main()
{
cout<<"Hello World!";
}
Here are the errors I am getting :-
C:\Documents and Settings\jay mata di\My Documents\c++\hello.c|1|error: iostream.h: No such file or directory|
C:\Documents and Settings\jay mata di\My Documents\c++\hello.c|3|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'namespace'|
C:\Documents and Settings\jay mata di\My Documents\c++\hello.c||In function 'main':|
C:\Documents and Settings\jay mata di\My Documents\c++\hello.c|7|error: 'cout' undeclared (first use in this function)|
C:\Documents and Settings\jay mata di\My Documents\c++\hello.c|7|error: (Each undeclared identifier is reported only once|
C:\Documents and Settings\jay mata di\My Documents\c++\hello.c|7|error: for each function it appears in.)|
||=== Build finished: 5 errors, 0 warnings ===|
I guess the problem's with the compiler or my computer (I am using codeblocks.) I ran the program online. It ran just fine. How can I rectify it?