Name: Anonymous 2012-01-16 8:59
for (I = 0; I < N; I++)
for (J = 0; J < M; J++)
update(Xs[I][J]);or
for (I = 0; I < N; I++)
for (J = 0; J < M; J++)
update(Xs[J][I]);???
for (I = 0; I < N; I++)
for (J = 0; J < M; J++)
update(Xs[I][J]);
for (I = 0; I < N; I++)
for (J = 0; J < M; J++)
update(Xs[J][I]);int var = ++i; is fewer instructions than int var = i++;i++ and ++i are different things, but OP is using it as they are equal even though they result in the same thing.
'
>inb4 they evaluate to the exact same thing on my computer++i methinks, but rather that some compilers *cough*micro$hit*cough* requires variables do be declared first in functions.
for (int i = 0; i < height; i++}
for (int j = 0; j < width; j++)
array[i][j] = value;
for (int i = 0; i < size; i++}
array[size / i][size % i] = value;
int var = ++i; results in var == 11, while int var = i++; results in var == 10. These two do not result in the same thing.