Custom input stream in C++
The proper way to create a new stream in C++ is to derive from
std::streambuf
and to override theunderflow()
operation for reading and theoverflow() and sync()
operations for writing. - SO
Stream buffers represent input or output devices and provide a low level interface for unformatted I/O to that device. Streams, on the other hand, provide a higher level wrapper around the buffer by way of basic unformatted I/O functions and especially via formatted I/O functions (i.e., operator« and operator» overloads). Stream objects may also manage a stream buffer’s lifetime. - SO
- Exposed buffers - Copy streams / Redirect streams / Tee streams
- The Boost Iostreams Library
yduf/input_logger.hh
Written on December 27, 2020, Last update on March 25, 2022
c++
file
io-stream
codingame