#include <ios> #include <streambuf> #include <istream> #include <ostream> namespace std { extern istream cin; extern ostream cout; extern ostream cerr; extern ostream clog; extern wistream wcin; extern wostream wcout; extern wostream wcerr; extern wostream wclog; }
The header <iostream> declares objects that associate objects with the standard C streams provided for by the functions declared in <cstdio> ([c.files]), and includes all the headers necessary to use these objects.
The objects are constructed and the associations are established at some time prior to or during the first time an object of class ios_base::Init is constructed, and in any case before the body of main begins execution.295 The objects are not destroyed during program execution.296 The results of including <iostream> in a translation unit shall be as if <iostream> defined an instance of ios_base::Init with static storage duration. Similarly, the entire program shall behave as if there were at least one instance of ios_base::Init with static storage duration.
Mixing operations on corresponding wide- and narrow-character streams follows the same semantics as mixing such operations on FILEs, as specified in Amendment 1 of the ISO C standard.
Concurrent access to a synchronized ([ios.members.static]) standard iostream object's formatted and unformatted input ([istream]) and output ([ostream]) functions or a standard C stream by multiple threads shall not result in a data race ([intro.multithread]). [ Note: Users must still synchronize concurrent use of these objects and streams by multiple threads if they wish to avoid interleaved characters. — end note ]
27.4.2 Narrow stream objects [narrow.stream.objects]The object cin controls input from a stream buffer associated with the object stdin, declared in <cstdio>.
After the object cin is initialized, cin.tie() returns &cout. Its state is otherwise the same as required for basic_ios<char>::init ([basic.ios.cons]).
The object cout controls output to a stream buffer associated with the object stdout, declared in <cstdio> ([c.files]).
The object cerr controls output to a stream buffer associated with the object stderr, declared in <cstdio> ([c.files]).
After the object cerr is initialized, cerr.flags() & unitbuf is nonzero and cerr.tie() returns &cout. Its state is otherwise the same as required for basic_ios<char>::init ([basic.ios.cons]).
The object clog controls output to a stream buffer associated with the object stderr, declared in <cstdio> ([c.files]).
27.4.3 Wide stream objects [wide.stream.objects]The object wcin controls input from a stream buffer associated with the object stdin, declared in <cstdio>.
After the object wcin is initialized, wcin.tie() returns &wcout. Its state is otherwise the same as required for basic_ios<wchar_t>::init ([basic.ios.cons]).
The object wcout controls output to a stream buffer associated with the object stdout, declared in <cstdio> ([c.files]).
The object wcerr controls output to a stream buffer associated with the object stderr, declared in <cstdio> ([c.files]).
After the object wcerr is initialized, wcerr.flags() & unitbuf is nonzero and wcerr.tie() returns &wcout. Its state is otherwise the same as required for basic_ios<wchar_t>::init ([basic.ios.cons]).
The object wclog controls output to a stream buffer associated with the object stderr, declared in <cstdio> ([c.files]).
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4