Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21273

Next free index of array?

$
0
0
Hi,

I'm printing some account details to a text file, and I'd like it to look like this:

Account_Number(INSERT NEXT FREE ACC NUMBER)
Username: NamVar
Password: PassVar
First Name: FirstNameVar
LastName: LastNameVar
Email: EmailVar

I've been able to do it apart from the top line, I basically want it to say the account number but I can't figure out a good way. This is what I've thought of:

Have an array of account numbers
Check for the next unoccupied index
Place that in a var so I can print it to file
Occupy that index by giving it the number of the index its located at

But im having trouble with how to find the next unoccupied index. Please can someone provide some insight or even some code ^.^

Viewing all articles
Browse latest Browse all 21273

Trending Articles