Шаблон функции
Primary tabs
в принципе всё аналогично шаблонам класса - пример:
template< class T,class T1 > void show_array(T *array,T1 count) { T1 index; for (index =0; index < count; index++) cout << array[index] << ' '; cout << endl; }
- Log in to post comments
- 2210 reads