/********************************************************************* example 7 - driver.cpp putting count into the class *********************************************************************/ #include <iostream> using namespace std; #include "safearray.h" void main() { safearray list; cout << "Uninitialized: " << list.count() << endl; for (int i = 0; i < maxsize; i++) { cout << "before: " << list.count(); list[i] = i*10; cout << " after: " << list.count() << endl; } for (int j = 0; j < list.count(); j++) cout << "Element " << j << " is " << list[j] << endl; }