given a 2D array for eg.
int arr[2][5] = { {5 , 3 , 4 , 1 , 2},{7 , 4 , 0 , 8 , 2}};
now I am sorting first row in ascending order and correspondingly 2nd row elements are also shifted. altered 2D array
int arr[2][5] = { {1 , 2 , 3 , 4 , 5},{8 , 2 , 4 , 0 , 7}};
I am using heapsort algo for acheiving this but i have to write whole code everytime. I want to know some way to acheive this using c++ standard functions. plzz someone help me out on this :)