
One Character Wonders 37
Program 25: Maximum Surprise
The loop in this program is designed to print a greeting ten times. But the
program has different ideas. So what happens?
NOTE This program fails to compile on the GNU compilers and other systems that do not imple-
ment preprocessor directives exactly as the standard calls for. (They do a better job, which
unfortunately breaks this program.)
1 /************************************************
2 * Print a bunch of greetings. *
3 ************************************************/
4 #include <iostream>
5
6 #define MAX =10
7
8 int main()
9{
10 int counter; // Current greeting
11
12 for (counter =MAX; counter ...