Could anyone help me out?
I'm trying to sort a double array here, and in QBasic the same style of code works perfectly but c++ just changes the first number in the 4x5 array and does nothing to the rest.. can anyone see any problems in this code?
//sort rows of new array in ascending order
int temp;
int c;
for (rr=0;rr<4;rr++){
for (c=0;c<4;c++){
for (cc=(c+1);cc<6;cc++){
if (newmatrix[rr][c]>newmatrix[rr][cc]){
temp=newmatrix[rr][c];
newmatrix[rr][c]=newmatrix[rr][cc];
newmatrix[rr][cc]=temp;
}
}
}
}