各位高手帮忙看看这段程序哪里出现问题了
Private Structure individual '个体Public chrom() As Integer
Public fitness As Double
Public varible() As Double
Public Sub initialize()
ReDim chrom(40)
ReDim varible(2)
End Sub
End Structure
''''''''''''''''''''''''''''''''''
Dim bianma As String
popsize = Val(TextBox2.Text)
chromsize = Val(TextBox1.Text)
If chromsize Mod 2 <> 0 Then
chromsize = chromsize + 1
End If
For i = 1 To popsize
currentpop(i) = New individual()
For j = 1 To chromsize
currentpop(i).chrom(j) = random(2)''''出现未将对象引用设置到对象实例
Next
Next