Y
Yanhao Zhu
Hi, all,
If I have an array like
int[] m = new int[] { 0, 1, 2, 3 },
is there a way I can separate the array into two, like
int[] m01 = somefunction?(m,0,2) // m01 will hold 1st and 2nd items
in array m
int[] m23 = somefunction?(m,2,2) // m23 will hold srd and 4th items
in array m ,
and &m01 = &m, &m23 = &m + 2, always, (& is the get address of operation)
In another words, what I want to do is to separate the array into
sub-arrays, and the sub-arrays should reference the same items in the
original array.
Any idea will be appreciated!
Thanks,
Yanhao Zhu
If I have an array like
int[] m = new int[] { 0, 1, 2, 3 },
is there a way I can separate the array into two, like
int[] m01 = somefunction?(m,0,2) // m01 will hold 1st and 2nd items
in array m
int[] m23 = somefunction?(m,2,2) // m23 will hold srd and 4th items
in array m ,
and &m01 = &m, &m23 = &m + 2, always, (& is the get address of operation)
In another words, what I want to do is to separate the array into
sub-arrays, and the sub-arrays should reference the same items in the
original array.
Any idea will be appreciated!
Thanks,
Yanhao Zhu