The reason one compiled differently is because different compilers have different standards
now if you look at where you got the error message it actually is not an error message at all
all it is is a warning that states you have a header declared in a non-standard way
your code will still compile and it will still run perfectly fine
however the using namespace std allows for the newer compilers to read
code in basic terms the same as an older compiler
because if you wanted to get incredibly technical if you didn't use the using namespace std
everywhere you typed cout you would have to type std::cout
but not only for cout but everything that the iostream library pulls
so in the end its just helping you out by saving you a little bit of typing
but remember to read the "ERROR MESSAGES" a little first because they aren't always errors
sometimes they are just warnings
if you have anymore questions about this or there is something I didnt cover or you want more info on
just ask
~ Geo
~ Don't take life too seriously, you'll never get out alive!
|