I currently have many definitions of individual functions and each of them is in its own .h file
do I have to create a .h and a .cpp file to define a single function?
For example, do I have to do this for each function?:
//InsertionSort.h
#ifndef INSERTIONSORT_H
#define INSERTIONSORT_H
template <class T>
void InsertionSort(T A[], short n)
#endif
//InsertionSort.cpp
template <class T>
void InsertionSort(T A[], short n){
T key;
for (short j=1, i; j<n; j++){
key = A[j];
i=j-1;
while(i>=0 && A[i] > key)
A[i-- +1] = A[i];
A[i+1] = key;
}
}