#include #include using std::string; using std::cout; using std::endl; template void array_test(const string& typ) { T array[SIZE]; cout << "declaring an array of " << SIZE << " " << typ.c_str() << " occupying a total of " << sizeof(array) << " bytes" << endl; } int main(int argc, char** argv) { array_test<5, int>("ints"); array_test<6, double>("doubles"); array_test<7, string>("strings"); array_test<8, char>("chars"); return 0; }