What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » [C help] how to...

[C help] how to...
Author: Message:
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: [C help] how to...
Ah right. In that case, what I would do is read each line of text from the file into an array, then use the random number generated to index the array.
Reading the file in: I would use a while loop, checking for an EOF. Of course, to make the array in the first place, the number of lines in the file would need to be known.
It may be worth seeing if C++ has a class similar to Java's ArrayList, which implements an expandable array of objects.
[Image: spartaafk.png]
06-11-2004 01:30 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[C help] how to... - by crank on 06-10-2004 at 02:32 PM
RE: [C help] how to... - by RaceProUK on 06-11-2004 at 10:09 AM
RE: [C help] how to... - by crank on 06-11-2004 at 01:26 PM
RE: [C help] how to... - by RaceProUK on 06-11-2004 at 01:30 PM
RE: [C help] how to... - by crank on 06-11-2004 at 01:38 PM
RE: [C help] how to... - by RaceProUK on 06-11-2004 at 01:41 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On