取消
显示结果 
搜索替代 
您的意思是: 

Dynamic Array Creation / Sorting and splitting an array

All,

    I have an array with a bunch of elements. Now these elements can be formed into groups, and the number of groups can change from run to run. I can identify which group the element belongs to but the part I can't figure out is how to dynamically create an array for each new group. Any ideas?

Regards,
Ken
xkenneth@ti.com
xkenneth@gmail.com
0 项奖励
1 条消息(共 2 条)
2,756 次查看

The thing I usually do in this scenario is create an array of clusters of arrays.  Then you can add to this array however many other separate arrays you want (with each separate array wrapped with a cluster), and the arrays can be of different sizes.

Let me know if you need more details...I've posted recently in another thread regarding this technique.

-D

0 项奖励
2 条消息(共 2 条)
2,754 次查看