#include <iostream> //标准输入输出流#include <iostream.h> //非标准输入输出流
In C + +, in order to avoid name definition conflicts, the namespace definition (namespace) is introduced, and when used in code, <iostream.h> it inherits the standard library file of C and has no namespace, so it is not (and cannot) use std::cout<<x; .
<iostream>the input and output needs to be referenced when the code is used std::cout<<x; .
There are ". h" is the non-C + + standard, is the standard library file C, no ". h", the use of command space , is the C + + standard library file.
The same is true of the following:
<string.h>is the old C header file, corresponding to a char-based string processing function;
<string>is the C + + header file that is packaged with STD, corresponding to the new string class;
<cstring>is the STD version of the old C header file, and char-based string processing functions.
The difference between iostream and iostream.h