// File: ptest2.cpp // // Use the Package class. // This program won't compile. #include #include "Package.h" using namespace std ; int main() { Package p1(1.0, 1.0, 1.0) ; Package p2(2.0, 2.0, 2.0) ; int r ; cout << "p1: " ; p1.identify() ; cout << "p2: " ; p2.identify() ; r = p2.Store(&p1) ; printf("store p1 in p2, r=%d\n", r) ; // public member functions in the Box class are not accessible // through a Package, because Package is a private direvation of Box p1.grow() ; r = compare(p1,p2) ; }