Apr 26, 2011 at 12:17am
hi all, question here about how to most efficiently do some file reading.
I have a txt file, and must read through the data until i hit
a certain word (we'll call it "word" in this case)
so file would look something like this
datadatadata
datadatadata
datadatadata
word
datadatadata
datadatadata
i was doing
while (infile != "word")
{
do task
}
but that didn't work.
Thanks for any advice
Apr 26, 2011 at 6:03am
you may edit it to your liking/usage
EDIT:: i got this function from one of my programs, and edited it to answer your question. so if it doesnt work right, just let me know
Last edited on Apr 26, 2011 at 6:05am