ar_t  >  
Defined in header ` [ <syncstream> ](/w/cpp/header/syncstream
"cpp/header/syncstream") `  
std::syncbuf  (C++20)  |  [ std::  basic_syncbuf  ](http://en.cppreference.com/w/cpp/io/basic_syncbuf) < char  >  
std::wsyncbuf  (C++20)  |  [ std::  basic_syncbuf  ](http://en.cppreference.com/w/cpp/io/basic_syncbuf) < wchar_t  >  
std::osyncstream  (C++20)  |  [ std::  basic_osyncstream  ](http://en.cppreference.com/w/cpp/io/basic_osyncstream) < char  >  
std::wosyncstream  (C++20)  |  [ std::  basic_osyncstream  ](http://en.cppreference.com/w/cpp/io/basic_osyncstream) < wchar_t  >  
  
####  [ [ edit ](/mwiki/index.php?title=cpp/io&action=edit&section=3 "Edit
section: Predefined standard stream objects") ]  Predefined standard stream
objects

Defined in header ` [ <iostream> ](/w/cpp/header/iostream
"cpp/header/iostream") `  
---  
[ cin  wcin  ](/w/cpp/io/cin "cpp/io/cin") |  reads from the standard C input stream  [ stdin ](/w/cpp/io/c/std_streams "cpp/io/c/std streams")   
(global object)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/io/dsc_cin&action=edit)  
[ cout  wcout  ](/w/cpp/io/cout "cpp/io/cout") |  writes to the standard C output stream  [ stdout ](/w/cpp/io/c/std_streams "cpp/io/c/std streams")   
(global object)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/io/dsc_cout&action=edit)  
[ cerr  wcerr  ](/w/cpp/io/cerr "cpp/io/cerr") |  writes to the standard C error stream  [ stderr ](/w/cpp/io/c/std_streams "cpp/io/c/std streams") , unbuffered   
(global object)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/io/dsc_cerr&action=edit)  
[ clog  wclog  ](/w/cpp/io/clog "cpp/io/clog") |  writes to the standard C error stream  [ stderr ](/w/cpp/io/c/std_streams "cpp/io/c/std streams")   
(global object)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/io/dsc_clog&action=edit)  
  
####  [ [ edit ](/mwiki/index.php?title=cpp/io&action=edit&section=4 "Edit
section: I/O Manipulators") ]  [ I/O Manipulators ](/w/cpp/io/manip
"cpp/io/manip")

The stream-based I/O library uses [ I/O manipulators ](/w/cpp/io/manip
"cpp/io/manip") (e.g.  [ std::boolalpha ](/w/cpp/io/manip/boolalpha
"cpp/io/manip/boolalpha") ,  [ std::hex ](/w/cpp/io/manip/hex
"cpp/io/manip/hex") , etc.) to control how streams behave.

####  [ [ edit ](/mwiki/index.php?title=cpp/io&action=edit&section=5 "Edit
section: Types") ]  Types

The following auxiliary types are defined:

Defined in header ` [ <ios> ](/w/cpp/header/ios "cpp/header/ios") `  
---  
[ streamoff  ](/w/cpp/io/streamoff "cpp/io/streamoff") |  represents relative file/stream position (offset from fpos), sufficient to represent any file size   
(typedef)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/io/dsc_streamoff&action=edit)  
[ streamsize  ](/w/cpp/io/streamsize "cpp/io/streamsize") |  represents the number of characters transferred in an I/O operation or the size of an I/O buffer   
(typedef)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/io/dsc_streamsize&action=edit)  
[ fpos  ](/w/cpp/io/fpos "cpp/io/fpos") |  represents absolute position in a stream or a file   
(class template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/io/dsc_fpos&action=edit)  
  
The following typedef names for  [ std::  fpos
](http://en.cppreference.com/w/cpp/io/fpos) < [ std::  mbstate_t
](http://en.cppreference.com/w/cpp/string/multibyte/mbstate_t) > are provided:

Defined in header ` [ <iosfwd> ](/w/cpp/header/iosfwd "cpp/header/iosfwd") `  
---  
Type  |  Definition   
` std::streampos ` |  [ std::  fpos  ](http://en.cppreference.com/w/cpp/io/fpos) < [ std::  char_traits  ](http://en.cppreference.com/w/cpp/string/char_traits) < char  > ::  state_type  >  
` std::wstreampos ` |  [ std::  fpos  ](http://en.cppreference.com/w/cpp/io/fpos) < [ std::  char_traits  ](http://en.cppreference.com/w/cpp/string/char_trai