Message-Id: <3.0.6.32.19991108174447.007ff940@dce03.ipt.br> X-Sender: csrabak AT dce03 DOT ipt DOT br X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32) Date: Mon, 08 Nov 1999 17:44:47 -0200 To: djgpp AT delorie DOT com From: "Cesar S. Rabak" Subject: Re: parse errors (compile time) In-Reply-To: <8071ob$kjk@hermes.acs.unt.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk At 11:35 08/11/99 -0600, "Morpheus" wrote: >Here is the code: > >int getFileNumLines(char* file) { > ifstream in(file); > if(!in) { > return 0; > } > char* line = new char[MAX_CHARS + 1]; // parse error here > int numLines = 0; > in.readLine(line, MAX_CHARS); // parse error here > > while(in) { > numLines++; > in.readLine(line, MAX_CHARS); // parse error here > } > > freeString(line); > in.close(); > return numLines; >} > >I get a parse error on the lines indicated. MAX_CHARS is defined in another >.h file, which is included. Thanks for help on this menial problem. > Humm. . . the problem description leads to the conclusion something is wrong with the macro MAX_CHARS definition. Get a look at it, or if still stuck post the line in the header where it is defined.