From: Weiqi Gao Newsgroups: comp.os.msdos.djgpp Subject: Re: 2 Questions! Date: Sun, 18 Jul 1999 08:21:31 -0500 Organization: CRL Network Services Lines: 26 Message-ID: <3791D4DB.190A8B15@a.crl.com> References: <7msim9$die$1 AT nnrp01 DOT ops DOT uunet DOT co DOT za> NNTP-Posting-Host: a116019.stl1.as.crl.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i586) X-Accept-Language: en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com 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 ( _optional ; _opt ; _opt ) 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