[求助]数组索引超出下标问题
Public Structure jilu
Dim name As String
Dim time As String
End Structure
Public data(6) As jilu
Sub ReadDat()
Dim st As IO.StreamReader = New IO.StreamReader("E:\xiangmulianxi\pintulianxi\Writer.txt")
Dim i As Integer
Dim str, str2 As String
Dim da(0), dat(0) As String
For i = 0 To 4
str = st.ReadLine()
da = Split(str, ",")
str2 = st.ReadLine()
dat = Split(str2, ",")
Next
For i = 0 To 4
data(i).name = da(i)
data(i).time = dat(i)
Next i
End Sub
运行时总是在data(i).name=da(i)报错,说数组索引超出下标
拜托各位帮忙看一下 哪里有问题