ManicQin said:
you mean something like
for(int i=0; i< FIRST*SECOND; ++i)
{
...
}
yeah... it is possible
[/QUOTE]
With some caveats: FIRST and SECOND might be macros (after all, they are all
upper case). So, maybe (FIRST)*(SECOND) is slightly better. And even then,
the product might overflow.
Why would you like to write it any other way?
The first way is more clear and easier to understand.
Right.
I hope you understand that Eric's answer only works in 3D arrays and
not with classes...
Huh? I don't see any 3D-arrays around. And why would there be any problem
with classes (e.g., inside the loop)? In short, I don't understand what you
mean. Could you explain?
[snip]
Best
Kai-Uwe Bux