// arrtemp.cpp -- using template functions with array template #include #include #include template void display(const std::array & ar); int main() { std::array ai = {1,2,3,4,5}; //,6,7,8,9,22}; std::array as = { "string under construction", "stupid string indeed", "there's nothing to see", "nothing to do", "but enjoy all that is" }; display(ai); display(as); // std::cin.get(); return 0; } template void display(const std::array & ar) { for (int i = 0; i < 5; i++) std::cout << ar[i] << std::endl; }