ostream
ostream is the standard output stream class in the C++ standard library. It is defined as part of the iostream facilities and represents the destination for character output. In standard terminology, std::ostream is an alias for std::basic_ostream<char>, with std::wostream serving as the wide-character counterpart. The class participates in the iostream hierarchy and uses a stream buffer (std::streambuf) to perform the actual I/O operations.
The primary interface of ostream is the insertion operators, commonly written as operator<<. These operators are
An ostream maintains formatting state that affects how data is written. This includes format flags, field width,
Common instances include std::cout for standard output, std::cerr for unbuffered error output, and std::clog for buffered