November 2001
Beginner
1128 pages
29h 12m
English
Now that you've seen a multifile program, it's a good time to extend the discussion of memory schemes in Chapter 4, “Compound Types,” for storage categories affect how information can be shared across files. It might have been awhile since you last read Chapter 4, so let's review what it said about memory. C++ uses three separate schemes for storing data, and the schemes differ in how long they preserve data in memory.
Variables declared inside a function definition have automatic storage duration; that includes function parameters. They are created when program execution enters the function or block in which they are defined, and the memory used for them is freed when execution leaves the function or block. ...