TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: ALL
from: BRIAN LUNERGAN
date: 1998-02-11 00:50:00
subject: Rookie seeks help with a project...

* Crossposted in C_PLUSPLUS
* Crossposted in C_ECHO
Hello All!
There's an old expression attributed to BP about expecting and getting the 
best out the scouts. "When in doubt, hand the kid the end with the jam on 
."
I have a sysop friend who has done just that to your rookie C++ author. The 
project is simple. Read a large text file into memory (his files.bbs file) 
and then rewrite the file, checking each line for certain unwanted text, 
keeping those lines that pass the "filter", and discarding those that don't. 
He has one version he did in Pascal, but it has a hard-coded limit of 800 
lines. Part of my assignment is to lift that lines restriction so that he can 
deal with much larger files.
I think I have the mechanics of reading in the file worked out and then 
writing it back to the same file (although I wouldn't mind learning from a 
few code snippets how others have dealt with this problem); however, I'm not 
sure how to handle the line by line checking before writing it back to the 
file. Any help and ideas would be greatly appreciated.
"There's no limit to what you can if you don't care who gets the credit..."
Brian Lunergan
Nepean, ON
Canada
E-mail: blunergan@cyberus.ca / Fidonet: 1:163/335.44
Member: HTML Writers Guild
        MS Site Builders Network -- Level 2
... Don't bother me now, I'm digging up my 'ROOTS'!
--- UNREG UNREG
---------------
* Origin: The Crystal Cave..., Nepean, Ontario, Canada (1:163/335.44)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.