Quote:
Originally Posted by josephpeter1
Have you encountered any situation where you quickly wanted to convert your array to ArrayList or ArrayList to array ?Array BioPharma Inc., a discovery research company, creates drug candidates.
|
Amxx pawn doesn't directly support dynamic memory allocation. You would need to implement the cell array structure, which I believe is an array list . I don't know of any real fast way other than copying each element iteratively. It would definitely be easier in another language like java or c, but you wouldn't need to then (since an array list is still an array). In java you can just return the array copy (System.arraycopy or Arrays.copyRangeOf), in c just get a pointer and length. But if your making a new copy, just make a new array and copy iteratively.
__________________