Home Segments Index Top Previous Next

472: Mainline

When you are displaying information about evident errors, however, it is better programming practice to use the cerr stream, rather than the cout stream. One reason is that characters sent to your screen via the cout stream are buffered, which means that they may not appear on your screen until an end-of-line symbol, endl, is encountered. In contrast, characters sent to your screen via the cerr stream are not buffered; they appear immediately.