cvs.gedasymbols.org/archives/browse.cgi | search |
From: | "Morpheus" <hall AT silo DOT csci DOT unt DOT edu> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | parse errors (compile time) |
Date: | Mon, 8 Nov 1999 11:35:30 -0600 |
Organization: | Zion |
Lines: | 32 |
Message-ID: | <8071ob$kjk@hermes.acs.unt.edu> |
NNTP-Posting-Host: | dfw-premium-70.dialup.unt.edu |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.00.2314.1300 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2314.1300 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
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. -- morpheus Email: hall AT cs DOT unt DOT edu Web: http://people.unt.edu/~dahall "You'll tell yourself, 'I don't believe in any of this fake crap!'"
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |