|
-
Jun 20th, 2002, 05:44 AM
#1
Thread Starter
Addicted Member
Read specific line
Hello,
I'm looking at writing a password generator that uses real words. In order to do this I've downloaded a relatively small dictionary text file, about 80K words (600kb), with a word-per-line.
Now, my problem is what is the best way to pick a word out of this file randomly, preferably with FSO?
Currently I count the number of lines in the file and use a random number generator to pick a number within the lines-of-file range. This is where I run into problems/issues. I can read each line into an array, and access the random element as required, but is this the best/most efficient way for such a large number of lines?
Thanks.
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
|