// testhighest.cpp - tests function template in highest.h // DO NOT CHANGE THIS FILE - you will not turn it in // use to test CS 60 assignment 5, part 3, Fall 2009 // cmc, updated 11/17/09 #include #include "highest.h" using std::cout; // from Nagler, p. 343 (plus a test for char data) int main() { int const array1[] = {4, 56, 0, -6, 11}; int const dim1 = sizeof array1 / sizeof *array1; cout << "highest int is " << highest(array1, dim1) << '\n'; double const array2[] = {5.78, -8.37, 6.123, -54.794}; int const dim2 = sizeof array2 / sizeof *array2; cout << "highest double is " << highest(array2, dim2) << '\n'; char const array3[] = "a string"; // 't' is highest int const dim3 = sizeof array3 / sizeof *array3; cout << "highest char is " << highest(array3, dim3) << '\n'; }