well i have this but it doesn't seem to work...
Code:
a=0;
b=0;
int c=mat.numrows();
int d=mat.numcols();
int totallength=mat.numrows()*mat.numcols();
cout << totallength;
for (a=0;a<mat.numrows();a++)
{
for (b=0;b<mat.numcols();b++)
{
temp=mat[a][b];
for (c; c<0; c--);
{
for(d; d<0; d--);
{
temp2=mat[c][d];
}
}
}
mat[a][b]=temp2;
mat[c][d]=temp;
}
Basically waht im trying to do is 4 nested for loops, 2 for the beginning and 2 for the end, and store the first one in a temp, store the last one in a temp2 and switch.. but doesnt work.