#include <iostream.h> non-standard input and output streams
#include <iostream> standard input and output streams
In C + +, in order to avoid name definition conflicts, the definition of namespaces is introduced, that is, namespace.
When using <iostream.h> in code, the output can directly refer to cout<<x;//<iostream.h> inherits the standard library file of the C language and does not introduce a namespace definition, so it can be used directly.
When <iostream> is introduced into the code, the output needs to refer to std::cout<<x; if it is still the same as the original method.
When using <iostream>, introduce std:: There are the following methods:
1.
using namespace Std;
cout<<x;
2.
Using Std::cout;
cout<<x;
3.
The most basic std::cout<<x;
This time you should know why it is usually used with # include <iostream>,
Use the using namespace Std; If you don't use this, the latter two methods will be used when using cout.
Other header files are the same.
(There is ". h" is non-standard, C standard library functions, no ". h", it is necessary to use the command space, is C + +.) Part of it is not exactly ". h" and no ". h" differences. Example: Math.h and Cmath)
The difference between C + + iostream and iostream.h