11.5 FORMAT-FREE OUTPUT

In some of the previous chapters, we have mainly used format-free output. The object cout and insertion operator (<<) have to be used. Chaining creates problems. The two outputs are touching each other. This is resolved by adding blank strings like (“ “) or some strings like “value of k is” in between. We can output all basic data types. We cannot output arrays or structures using insertion operator. We have to write array elements or components of a structure or attributes of an object individually.

Get Object Oriented Programming with C++, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.