Code:
#include "qsortcode.cpp"
You shouldn't include a .cpp file directly. Search the board for more info.
Here are the errors I get (not exactly "thousands"):
Code:
user@3[tmp]$ g++ -W -Wall -ansi -pedantic -O2 -s -o qsorttest qsorttest.cpp
qsorttest.cpp: In function `int main(int, char**)':
qsorttest.cpp:119: error: `genIntDblArray' undeclared (first use this function)
qsorttest.cpp:119: error: (Each undeclared identifier is reported only once for
each function it appears in.)
qsorttest.cpp:155: error: cannot convert `int*' to `double*' for argument `1'
to `void genDblDescArray(double*, int)'
qsorttest.cpp:15: warning: unused parameter `int argc'
qsorttest.cpp:15: warning: unused parameter `char**argv'
qsortcode.cpp: In function `int ChoosePivot(T*, int, int) [with T = double]':
qsortcode.cpp:52: instantiated from `void Partition(T*, int, int, int&) [with T = double]'
qsortcode.cpp:106: instantiated from `void QuickSort(T*, int, int) [with T = double]'
qsorttest.cpp:162: instantiated from here
qsortcode.cpp:33: warning: converting to `int' from `double'
user@3[tmp]$
Maybe that will help.