Slurpee Posted June 23, 2003 Posted June 23, 2003 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 :) Quote
Administrators PlausiblyDamp Posted June 23, 2003 Administrators Posted June 23, 2003 I would recomend dropping the VB6 FileOpen / FilePut and look at the System.IO namespace. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.