Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

why are we not use #include <‍iostream.h>‍ in c++?

+5 votes
asked Mar 22, 2021 by kunjal kanani (640 points)

2 Answers

+3 votes
answered Mar 23, 2021 by Peter Minarik (84,720 points)
edited Mar 23, 2021 by Peter Minarik

Please, read how the include keyword is used.

To give you a quick answer: there is no "iostream.h" file. The actual name for it is "iostream" (no extension). This is how the C++ library headers are named.

The standard naming for your own headers is "myHeader.h" or "myHeader.hpp" for templates though, so the assumption of the name of the header being "iostream.h" was not totally wrong from your end.

–2 votes
answered Mar 28, 2021 by yogesh nagre (110 points)
yes <iostream.h> is used in the c++ language
commented Mar 29, 2021 by Peter Minarik (84,720 points)
No, it is not.

"iostream.h" does not exist. The correct file name is "iostream".
commented Apr 17, 2021 by Eleni C (100 points)
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...