|
|
mincol is a copy you only swap the copy. The first row is unaffected. So change mincol to a reference:int &mincol=arr[0][usercol-1]; // Notice the & mincol it would look something like this:int &mincol=arr[outer_row_index][usercol-1]; // Notice the &