I'm referencing a templated quicksort method in my cpp function like this:
Main.cpp
QuickSort<vector<int>>(testData);
Where testData is:
int arr[] = {0, 5, 3, 4, 2, 1, 4};
vector<int> testData (arr, arr + sizeof(arr) / sizeof(arr[0]));
The declaration of quicksort in the .h file is:
Sorting.h
template <typename T>
void QuickSort(std::vector<T>& Unsorted);
And the function definition is:
Sorting.cpp
template <typename T>
void QuickSort(std::vector<T>& Unsorted)
{
//implementation here
}
Am I losing my mind? I'm just trying to pass a vector of ints by reference. Could someone tell me where I'm going wrong?