读书人

vb type 内嵌动态数组的有关问题

发布时间: 2012-01-23 21:57:28 作者: rapoo

vb type 内嵌动态数组的问题
Type aa
bb() As Integer
End Type

Dim cc As aa
ReDim bb(10) As Integer
Print cc.bb(2)

请问最后一行为什么会报错:下标越界?

[解决办法]
打快了 有个错误
Type aa
bb() As Integer
End Type

Dim cc As aa
ReDim cc.bb(10) '这里不用再指明变量类型
Print cc.bb(2)

读书人网 >VB

热点推荐