
116 Chapter 6
Program 77: No Value
The following program fails to compile because the
value
is undefined. We
never use the variable
value
, so what’s the problem?
1 /************************************************
2 * double -- Print a double table for the *
3 * numbers 1 through 10. *
4 ************************************************/
5 #include <iostream>
6
7 /************************************************
8 * DOUBLE -- Macro to double the value of a *
9 * number. *
10 ************************************************/
11 #define DOUBLE (value) ((value) + (value))
12
13 int main()
14 {
15 // Counter for the double list
16 int counter;
17
18 for (counter = ...