Top "Ostream" questions

In C++ std::ostream is the base class for output streams.

Center text in fixed-width field with stream manipulators in C++

I am refactoring some legacy code which is using printf with longs strings (without any actual formatting) to print out …

c++ string stringstream ostream manipulators
Is there a null std::ostream implementation in C++ or libraries?

I'm looking for a std::ostream implementation that acts like /dev/null. It would just ignore anything that is streamed …

c++ null ostream
How do I create my own ostream/streambuf?

For educational purposes I want to create a ostream and stream buffer to do: fix endians when doing << …

c++ ostream streambuf
How to inherit from std::ostream?

I've been googling around and I just can't find a simple answer to this. And it should be simple, as …

inheritance stl ostream
Using a vector of unique pointers to an <Employee> vector

For a school assignment, I am trying to use a vector of unique pointer's to Employee objects to access the …

c++ pointers vector ostream
C++ template/ostream operator question

trying to get the operator to work, but throwing me bunch of errors: my header file template <unsigned short …

c++ operator-keyword ostream
Where is cout declared?

My computer science professor wants us to find the declaration of cout. I've compiled a simple Hello world program using …

c++ terminology cout ostream
Why the constructor of std::ostream is protected?

Why I can't just create an "empty" stream for my output like this std::ostream out; ? This rows is apparently …

c++ iostream ostream
Using std::ostream as argument to a print function

I have always used cout to print the statement but now I want learn printing by passing the stream, something …

c++ iostream ostream
'std::ios_base::ios_base(const std::ios_base&)’ is private' error while overloading operator<< for std::ostram

I've got a struct which looks like this: sturct person { string surname; person(string n) : surname(n) {}; } I need to …

c++ iostream ostream