Hi,
Regarding Example 8_01 (page 436):
1. Is there a syntax error in the following bold line:
int main (int argc, const char * argv[])
{CBox boxes[5];
CBox *cigar = new CBox (8.0, 5.0, 1.0);
CBox *match = new CBox (2.2, 1.1, 0.5);
CBox *pB1 = cigar;
CBox *pB2 = 0;
cout << endl << "Volume of cigar is " << pB1->Volume();
pB2 = boxes;
boxes[2] = *match;
...
I can only get the desired result by seemingly dereferencing the match pointer. This is not in the text.
2. On exit, I only have five messages referring to the destructor call. Shouldn't there be seven ?
Thanks,
Scott