Iostream
Encyclopedia : I : IO : IOS : Iostream
- The correct title of this } is }}}. The initial letter is capitalized due to [Naming conventions #Lower case first lettertechnical restrictions].
| C++ Standard Library |
|---|
| ios |
| iostream |
| map |
| sort |
| C Standard Library |
| cassert |
| cmath |
| cstdio |
| cstdlib |
| ctime |
iostream is a header file which is used for input/output in the C++ programming language. iostream stands for Input/Output Stream. In C++ and its predecessor, the C programming language, there is no directly-included method for streaming data input or output. Instead, these are combined as a library. iostream handles basic input and output for C++, whereas stdio.h is used in C. iostream uses the objects cin, cout, and cerr for sending data to and from the standard streams input, output and error respectively.
The canonical Hello world program can be as follows:
#includeThis program would output "Hello, world!" followed by a newline.int main()
The cout object is of type ostream, which overloads the left bit-shift operator to make it perform an operation completely unrelated to bitwise operations. The cerr object is also of type ostream, so it overloads that operator as well. The cin object is of type istream, which overloads the right bit-shift operator. The directions of the bit-shift operators make it seem as though data is flowing towards the output stream or flowing away from the input stream.
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
