Posted on 2005-04-14
I have this sub in my code.
Public Sub get_data(ByRef first() As String, ByRef last() As String, ByRef email() As String)
Dim counter As Integer
'Open the text file so we can read the data into the array
FileOpen(1, "testfile.txt", OpenMode.Input)
counter = 0
tCounter = 0
Do Until (EOF(1))
counter += 1
tCounter += 1
I need to change the arrays to a structure, so I created my structure
Public Structure user_data
Public fName As String
Public lName As String
Public eMail As String
Now the input you need to pass the file number, and a ByRef Value as an Object what should I use? I tried to do this but it didn't work.
Public info_data(25) As user_data
Public Sub get_data(ByRef data_temp As user_data)
but when I ran the software I still don't see any data on my info_data
what I'm trying to do is to read a text file, where I have some information, and store on my structure. When I use array it works, but I need to do with structure.