
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>cin log stream</b>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
cin Log Stream
In C++, clog is used to log a stream, and it corresponds to
stdout. You can work with clog like this: clog<<x, where x is a
data type or object, and << is the overloaded left shift operator,
also called the insertion operator in C++. Note that clog is also
an alias for ostream_withassign, and that it is a buffered form of
cerr.
Note: You can also chain the use of << and >> like this:
clog << "This is the value of x:" << x << "\n"; You do not
need to worry about the type of the arguments you pass
-- the << and >> operators are overloaded to handle all
standard types, and you can even overload them for your own
types.
In addition, you can format log output with the clog.setf()
member function -- see Formatting for more details.
See Also: cin cerr cout Formatting
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson