Sorting Using Function Pointer In Cpp