Hello there, I have started learning c++ and the book im reading shows different ways of writing the "hello world" programme, i just want to know how and why these are different.
#include <iostream.h>
int main ();
int main ()
{
cout <<"hello world!!";
return 0;
}
in this example the book says that you dont need to have the "int main();" as newer compilers automaticly does it for your or somthing.
and then it goes on replacing "<iostream.h>" with "<iostream>" in the next example but using namespace std;
#include <iostream>
using namespace std;
int main ()
{
cout <<"hello world!!";
return 0;
}
Soo im just wondering what the int main(); thing is about and can someone please explaing the relationship between "iostream.h and namespace std;"
im lost!!