Files
2025-10-25 03:02:53 +03:00

73 lines
2.4 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[narrow.stream.objects]
# 31 Input/output library [[input.output]](./#input.output)
## 31.4 Standard iostream objects [[iostream.objects]](iostream.objects#narrow.stream.objects)
### 31.4.3 Narrow stream objects [narrow.stream.objects]
[🔗](#lib:cin)
`istream cin;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L545)
The object cin controls input from a stream buffer associated with the object stdin,
declared in [<cstdio>](cstdio.syn#header:%3ccstdio%3e "31.13.1Header <cstdio> synopsis[cstdio.syn]")[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L550)
After the objectcin is initialized,cin.tie() returns&cout[.](#2.sentence-1)
Its state is otherwise the same as required for[basic_ios<char>::init](istream.cons#lib:basic_ios,init "31.7.5.2.2Constructors[istream.cons]")[.](#2.sentence-2)
[🔗](#lib:cout)
`ostream cout;
`
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L567)
The object cout controls output to a stream buffer associated with the object stdout,
declared in [<cstdio>](cstdio.syn#header:%3ccstdio%3e "31.13.1Header <cstdio> synopsis[cstdio.syn]")[.](#3.sentence-1)
[🔗](#lib:cerr)
`ostream cerr;
`
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L579)
The object cerr controls output to a stream buffer associated with the object stderr,
declared in [<cstdio>](cstdio.syn#header:%3ccstdio%3e "31.13.1Header <cstdio> synopsis[cstdio.syn]")[.](#4.sentence-1)
[5](#5)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L584)
After the objectcerr is initialized,cerr.flags() & unitbuf is nonzero and cerr.tie() returns &cout[.](#5.sentence-1)
Its state is otherwise the same as required for[basic_ios<char>::init](istream.cons#lib:basic_ios,init "31.7.5.2.2Constructors[istream.cons]")[.](#5.sentence-2)
[🔗](#lib:clog)
`ostream clog;
`
[6](#6)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L600)
The object clog controls output to a stream buffer
associated with the object stderr,
declared in [<cstdio>](cstdio.syn#header:%3ccstdio%3e "31.13.1Header <cstdio> synopsis[cstdio.syn]")[.](#6.sentence-1)