C++ merge sort with pointers