13.1 Introduction

This chapter discusses a range of capabilities sufficient for performing most common input/output operations and overviews the remaining capabilities. We’ve already demonstrated I/O with string objects in earlier chapters and discuss it in more detail in Chapter 21. The string processing demonstrated in this chapter focuses on char* strings. In earlier chapters, we introduced various I/O features—here we provide a more complete treatment.

C++ uses type-safe I/O. Each I/O operation is executed in a manner sensitive to the data type. If an I/O function has been defined to handle a particular data type, then that function is called to handle that data type. If there is no match between the type of the actual data and a function ...

Get C++ How to Program, 10/e 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.