That your first attempt doesn't work is logical since changing i and j variables within the function doesn't affect the parameters that were used to set these variables.
Your second attempt looks fine to me.
What exactly isn't working ?
|
Results 1 to 6 of 6
Thread: swapping array elementsHybrid View
|
Click Here to Expand Forum to Full Width |