//16. Шаблони за функции; предефиниране. // // Using template functions #include template void printArray(T *array, const int count) { for (int i = 0; i < count; i++) cout << array[i] << " "; cout << endl; } main() { const int aCount = 5, bCount = 7, cCount = 6; int a[aCount] = {1, 2, 3, 4, 5}; float b[bCount] = {1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7}; char c[cCount] = "HELLO"; // 6th position for null cout << "Array a contains:" << endl; printArray(a, aCount); // integer template function cout << "Array b contains:" << endl; printArray(b, bCount); // float template function cout << "Array c contains:" << endl; printArray(c, cCount); // character template function return 0; } ---------------------------------------------------------