Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I'm new to the random file thing and I'm having a few issues trying to make a simple lotto number generator/analyser. Anyway I'm generating the six random numbers and then sticking this info into an array so I can check for duplicates. Naturally this is the easy bit, I fall into problems when I try and enter this info into my file structure. So anyone got some advice on looping and entering random information into a file structure???

 

I have done it this way to start the project off:

FileOpen(1, "numbers.data", OpenMode.Random, OpenAccess.ReadWrite, OpenShare.Shared, Len(udtLotto))

       For count = 1 To 10
           udtLotto.first = ran()
           udtLotto.second = ran()
          etc...

           FilePut(1, udtLotto, count)
        Next count
        FileClose(1)

any advice warmy appreciated :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...