Quicksort implementation in CPP