Mail Archives: djgpp/1999/07/18/10:00:44
Burger Rule wrote:
>
> 1) In this code:
>
> for (i=1, i<10, i=i+1)
>
> The error message I get from this is -> "Error: parse error before ' ) ' ".
The compiler is looking for the
for ( <expression>_optional ; <expr>_opt ; <expr>_opt ) <statement>
construction as specified by the ANSI C grammar once it sees the "for".
In C, "i = 1, i < 10, i = i + 1" counts as ONE expression. The compiler
is looking the the first semi-colon after this expression when it sees
the ')'.
> 2:) Based on your experience with different books you studied to learn and
> to become a expert in C++, what would you recommend for a beginner as a
> really excellent book on teaching C++.
[1] Stanley B. Lippman & Josee Lajoie, C++ Primer, 3rd ed.,
Addison-Wesley, Reading, Massachusetts, 1998
--
Weiqi Gao
weiqigao AT a DOT crl DOT com
- Raw text -