+ 1
<iostream> and <iostream.h> ?? /////cout and std::cout ?????
what's the difference between this headers in iostream and what's the difference between cout orders ?!!!!
1 Respuesta
+ 3
"iostream.h is deprecated by those compilers that provide it, iostream is part of the C++ standard."
std:: is a namespace, like a package when you do std::cout it will specificly get that method/function from std:: "package"
people use this because there might be more than one package that are using same function/method names and if they didnt specify that the code wouldn't work as expected.
If you dont do "big" stuff, you can go ahead and define the namespace so you dont have to write std:: all the time..
and in order to do that you can use
using namespace std;
after declaring that you won't have to use std:: anymore