#ifndef SORTERH #define SORTERH //T must be a data type to which we can apply the operators < and =, //and that has a copy constructor (line 13). template void sorter(T *begin, T *end) { while (begin < --end) { for (T *p = begin; p < end; ++p) { if (p[1] < p[0]) { const T temp = p[0]; p[0] = p[1]; p[1] = temp; } } } } #endif