Latin square

Hello!
I have an assignment in which I have to check if an entered DYNAMIC 2D array is a latin square, such as
1234
4321
2413
3142
I know that I need to make a bool function in which every row is sorted and and check if it then is the same as an array[n]{1;2;3;4;...;n}.
I have never dealt with 2D arrays so my problem is - how can I sort every row vertically and horizontally AND then check if it is the same as this array[n]?
Any help is gladly appreciated!
Topic archived. No new replies allowed.