The difference between iostream and iostream.h and stdio.h

The difference between iostream and iostream.h and stdio.h

#include <iostream.h> Non-standard input and output streams

In the early version of vs, such as VC6.0, the old version of the C++ standard library, such as iostream.h, was used, and the standard library did not introduce a namespace at that time. Therefore, it is possible to #include <iostream.h> directly. But in vs2005, the new C++ standard library is used, and only #include can be used.

#include<iostream standard input and output stream

io:in&out stream: stream, Xiaoxi means "input and output stream". It is a header file for I/O in C++, which includes all input and output function calls, which are generally used under the console.

stdio.h is a C language thing, the input and output are printf(...);,scanf(...);
iostream.h is a C++ thing, the input and output are such cout<<...;,cin>>...;
stdio .h is the C standard I/O library, which writes or reads characters to or from the buffer in the form of functions.
iostream is a C++ standard I/O library, which introduces the concept of input/output streams. It is a class library that reads and writes characters from streambuf in class methods.

Guess you like

Origin blog.csdn.net/m0_37882192/article/details/108954852