Question:
Can someone explain the reason for iostream.h and how it works?
?
2012-08-15 15:37:00 UTC
I know that it's a library and it's declared at the beginning of C++ documents but I want to know why I have to add it into them and how it works.

Is it a document somewhere in the computers OS?

If it helps, I understand many web development languages and exactly how the Internet works. I have experience in that sort of thing but not software development.

Also, please type like you know how to write the English language. I hate it when people reply with answers that I can't even read.

(-_-')
Three answers:
AdH
2012-08-15 15:50:15 UTC
First of all you shouldn't be including iostream.h. Use iostream instead.



"Is it a document somewhere in the computers OS?"



Obviously, yes.



iostream is a part of C++'s standard library. It's a header file. Header files define classes and functions signatures. They [normally] do not include implementations.



You need it if you want to use its functions. IO stands for IN and OUT, therefore in/out stream. If you wish to use objects like cout or cin, you must include it. Otherwise you do not require it.



Same with all other header files.



If you fail to understand my English, it's more likely to be an issue with your technical background than a problem with my fluency.
The Shadowman
2012-08-15 22:52:09 UTC
iostream.h is the old standard library. So it's not recommended to use that one, rather, you should be using , which is the latest standard library. If you're going to us the iostream.h, use an old compiler, such as Dev C++ or Turbo C++. If using new ones, such as MS Visual Studio, Jgrasp, Eclipse and Netbeans, you have to use the iostream. But here's something you need to know, when using iostream.h the "using namespace std;" isn't needed, but the iostream, adding that would make it more easy to code. So you should use iostream for new code and iostream.h in legacy code. You can't mix them together in one program because iostream.h is incompatible with the new standard library.
?
2012-08-15 22:40:02 UTC
iostream = input output stream



basically you need that to use the basic things, like cin, cout.....


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...