|
-
May 27th, 1999, 08:07 AM
#1
File Search
I'm a AP student at a high school loking for some help with a problem i'm having....
I was wonder how i would go about searching for text in a .txt file for .dat file without reading it into an array...
Thank You
-Argonic
Scott Miller
-
May 27th, 1999, 08:32 AM
#2
Re: File Search
This is one possible solution :
Read a char from the file. If the char is equal to the first char of the searchstring then add one to a counter. Read the next char and check it with the second(= counter) char of your searchstring. If the char is not equal reset counter to 0. If counter is equal to the length of your searchstring then you have found the string in the file.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|