November 2001
Beginner
1128 pages
29h 12m
English
You will learn about the following in this chapter:
Implicit and explicit copy constructors
Implicit and explicit overloaded assignment operators
What you must do if you use new in a constructor
Implementing a queue ADT
This chapter looks at how to use new and delete with classes and how to deal with some of the subtle problems that using dynamic memory can cause. This may sound like a short list of topics, but these topics affect constructor design, destructor design, and operator overloading.
Let's look at a specific example of how C++ can add to your memory load. Suppose you want to create a class ...
Read now
Unlock full access