Top "Iostream" questions

The C++ iostream library is an object-oriented library that provides input and output functionality using streams.

How do the stream manipulators work?

It is well known that the user can define stream manipulators like this: ostream& tab(ostream & output) { return …

c++ iostream ostream
How can I compose output streams, so output goes multiple places at once?

I'd like to compose two (or more) streams into one. My goal is that any output directed to cout, cerr, …

c++ boost stream iostream tee
What is the C++ iostream endl fiasco?

I was listening to a google talk by Andrei Alexandrescu on the D programming language when he threw out a …

c++ iostream endl
redirect std::cout to a custom writer

I want to use this snippet from Mr-Edd's iostreams article to print std::clog somewhere. #include <iostream> #include &…

c++ stream stringstream iostream streambuf
C++ buffered stream IO

I understand that by default all stream IO supported by C++ is buffered. This means that data to be output …

c++ iostream buffered
Using char16_t and char32_t in I/O

C++11 introduces char16_t and char32_t to facilitate working with UTF-16- and UTF-32-encoded text strings. But the &…

c++ c++11 iostream char16-t char32-t
std::ostream_iterator prevent last item from using the delimiter

Is there a way to use a std::ostream_iterator (or similar) such that the delimiter isn't placed for the …

c++ iostream stl-algorithm
Does anyone actually use stream extraction operators?

I've written tons of operator<<(std::ostream &, const T &) functions -- they're incredibly useful. I've never …

c++ iostream formatted-input
Display numbers with padding and a fixed number of digits in C++

I'd like to display numbers using a padding (if necessary) and a fixed number of digits. For instance, given the …

c++ iostream iomanip
What serious alternatives exist for the IOStream library? (besides cstdio)

I'm looking for a library which operates similar to iostreams, in that it performs conversions, and allows writing to memory …

c++ iostream