August 1999
Beginner to intermediate
912 pages
15h 44m
English
Understand the differences between allocating memory statically and dynamically
Learn about the stack and the free store
Discover the new and delete operators
See how you can dynamically allocate arrays
Learn to handle dynamic memory allocation errors
Find out how you can create your own new and delete operators
When you declare a predesignated number of variables for a program to use during its execution, you are working with static memory. Static memory is reserved by the compiler at compile time. Let’s say you are planning to use an array of structures to represent employee data in a program, for example:
struct Employee { char FirstName[15]; char LastName[20]; float ...