I want to pass a 2dim array called aArray1 to a function. The function job is swapping 2 rows of array. I want to know that Is aArray1 changed too or I should do something else to transfer the swap to the aArray1 in the end of function?
thank you vlad from moscow. My problem is not the swap function, My problem is, I want to know that Can I see the change the function made after calling that function or do something to make that change affect on my aArray1?
You can return a bool value from the function that will report whether the function changed your array or not.
But it seems there is another problem . You do not understand arrays. So I am repeating you can use function std:;swap to swap any rows of an array.