/********************************************************************* example 5 - driver.cpp basic safearray use as a template *********************************************************************/ #include <iostream> using namespace std; #include <time.h> #include "safearray.h" typedef safearray<float> SAFEARRAY; void main() { SAFEARRAY list; time_t t; srand((unsigned) time(&t)); for (int i = 0; i < list.maxsize; i++) list[i] = (rand()%1000)/10.0; for (int j = 0; j < SAFEARRAY::maxsize; j++) cout << "Element " << j << " is " << list[j] << endl; }