Insertion sort in C++