I appreciate elegant solutions, but ...
your [link|http://mathbits.com/MathBits/CompSci/looping/operator2.htm|Conditional Operator] solution was perfect.
It works!
I just have a couple of final things to clean up, then it'll be done.
\n for (int k=0; k <= (hardcopy ? (MaxHeader-1) : 0); k++)\n {\n // Immediately check to see if this is only a single map.\n if (!hardcopy) k = SelectedHeader;\n \n (( lots of other stuff))\n \n }\n
I had to add the equality to the
for statement, otherwise the loop doesn't execute if I'm not printing. That meant that the end count had to be adjusted too.
Thanks very much for your help! I never would have figured this out without a pointer. :-)
Cheers,
Scott.