Implement the missing functions in String.cpp
and test your code execution with the debugger.
Aside from the constructor, you don't need to handle memory directly. All functions can be implemented using the already existing functions. You don't need to write more than 3-5 lines of code for any of the functions. Try to figure out the most elegant solution instead of manually handling characters.
Implement quicksort as a template function that works on arbitrary types. Test it on different arrays. Use at least one built-in type such as int or double and at least one custom type such as Complex, Rational or Vector. Demonstrate your results via printing (i.e. overload operator<< if necessary).
Example usage:
int* t[4];
t[0] = new int(1);
t[1] = new int(-1);
t[2] = new int(10);
t[2] = new int(22);
quicksort(t, 4);
for (int i=0; i<4; i++) std::cout << t[i] << " ";
Complex* c[3];
c[0] = new Complex(0, 0);
c[1] = new Complex(1, -4);
c[2] = new Complext(3, 3);
quicksort(c, 3);
for (int i=0; i<3; i++) std::cout << c[i] << " ";
You can wrap it in a new quicksort:
void quicksort(int** array, int size) {
old_qsort(array, size, 0, size-1);
}