or you could just put "using namespace std;" after your include statements, or even "using std::cin;".Originally Posted by LloydUzari
or you could just put "using namespace std;" after your include statements, or even "using std::cin;".Originally Posted by LloydUzari
Boy, this is a popular topic around here lately. Check Including namespaces for my thoughts on the subject. Cliffnotes version: worrying about typing five extra characters instead of looking up the real positives and negatives behind which headers to use doesn't bode well for the quality of your code in the future, in my opinion.
Also, The <iostream.h> and <fstream.h> are not deprecated. Deprecated means that they are part of the standard, but are old and should be phased out of your programs. The <stdlib.h> header is deprecated, as are all the other C++ versions of the C runtime library headers. The <iostream.h> and <fstream.h> headers are just not standard at all, meaning most compilers that aim to be standards conforming don't need to support them. Many still do because they try to stay compatible with pre-standard C++, but more and more compilers are giving errors or warnings for using the outdated header files.