Chapter 40 Introduction to Files
40.1 Introduction
All programs you have seen so far can be described as “temporary”. Even though they read some input data and display some output results, all of the values are stored in variables, arrays, and other data structures that exist in the main memory (RAM) of your computer; therefore, these values are all lost when the program finishes executing. Even if this doesn't happen, they are certainly lost when you shut down your computer. There are many cases, however, where you need to keep those values in more permanent storage devices, such as a Hard Disk Drive (HDD) or a Solid State Drive (SSD).
C++ can read input data stored in a computer file or write output results in the same or a different file. ...
Get C++ and Algorithmic Thinking for the Complete Beginner 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.