开发者

dynamic multidimension vector

开发者 https://www.devze.com 2023-04-04 06:14 出处:网络
Is it possible that multidimension vector work this way by creating new value into vector dynamically, not fixed array size as multidimension ar开发者_开发技巧ray does?

Is it possible that multidimension vector work this way by creating new value into vector dynamically, not fixed array size as multidimension ar开发者_开发技巧ray does?

Such as below array where [0] will create new array ['24']['25'] more than [1]

[0]['22']['23']['24']['25']
[1]['22']['23']
[2]['34']

How do I get how many array on row[0]?


It is possible, although in flash arrays are dynamically size and vectors are fixed sized.

What you are looking for is called a ragged array - in flash this is just an array of arrays or nested Arrays.

Here is a site that describes the concept - I'd recommend reading all of it, but the specific part is called "The Solution: Nested Arrays", halfway down the page:

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号