// generate a random array of size 's' template void GenArray(int s, T a[]) { for (int i = 0; i < s; i ++) a[i] = (T)(rand()%256); // cast to be type T, anticipating // integers, floats, doubles, chars } // print array template void PrintArray(int s, const T a[]) { for (int i = 0; i < s; i ++) cout << a[i] << endl; }