Defining Classes for Elements; page 734
To clarify my understanding of a few points:
a) Figure 14-15. The path in the '.h file' box points to ...\Elements.h and the '.cpp file' box points to ...\Elements.cpp (Where the '...\' will include the rest of the particular path to the files from the C: or D: drives, etc.)
b) Second paragraph, below Figure 14-15; 4th line:
I think that this should refer to figure 14-15 not Figure 14-14.
c)Second paragraph, below Figure 14-15; final sentence: ...'each with a constructor and virtual destructor.'
It appears that despite ticking the virtual destructor box, as indicated in Figure 14-15, for each definition, none of the subsequent destructors (CLine, CRectangle, CCircle or CCurve) have virtual destructors in Elements.h. Only the destructor in the definition of 'class CElement : public CObject' has virtual against it. (I have checked this with the code in Elements.h in '571974 Code from the book'.)