All statements that are parts of other statements must
be compound statements
(surrounded by braces).
For example, the body of a loop
must be a compound statement. The parts of an if-statement
must be compound statements. For example,
if(x == 0) return 0; else return 2*x + 1;violates this rule. Use
if(x == 0)
{
return 0;
}
else
{
return 2*x + 1;
}
Compound statements must be correctly indented. |