insertion sort in c plus plus with two fors