May 2002
Beginner
320 pages
6h 18m
English
So far, all of the calculator's actions have been based on your input, and when you stop the calculator, all of the work you've entered into it has been lost. This is because program variables only retain their content while the program is running. Their collected content is often referred to as the program's state.
Most computers have a file system, whose purpose is to retain data between program runs. And every programming language has a way to put data into files in the file system and get data from them. C++ uses a special kind of stream—the fstream (file stream), which is similar to cin and cout—for that purpose.
Unlike cin and cout, the file stream #include<fstream> does not provide variables representing ...
Read now
Unlock full access