I have just started learning cpp and one thing that is really confusing me is #include <iostream> or #include<vector>. Some people say that we are including iostream library and some say that #include is used for including header files. But iostream and vector don't have .h extension so how can they be header files? Also, can we include a library by using #include ? This also makes me think about difference between iostream.h and iostream . Which one is header file? Which one is library? If we are only including header files then why don't we write #include<vector.h>?
What does the standard cpp library contain? Smaller libraries like containers library , utilities library?
I tried looking on cppreference but couldn't understand
<iostream>is a header specified (with some variations) in all C++ standards. It provides declarations of types (e.g.std::istreamandstd::ostream), and objects(e.g.std::cout). Since C++11, it#includes other standard headers related to I/O (e.g.<ios>). Like all standard headers, it is a component of the C++ standard library (specifically - its purpose is providing a defined interface for code to use parts of the library).<iostream.h>has never been part of standard C++, but was a precursor to<iostream>that predated the first C++ standard (which was ratified in 1989).#includealways refers to a source file, the name of that file can be anything at all. An extension of.his common, so is.hppbut the C++ standard headers do not have any extension. Programmers who say that you are including a library are using the wrong terminology.#includealways refers to a source file". Standard headers don't have to be actually files, compiler could use another approach as in memory AST or database, or "intrinsics" for those.<vector>.