View Single Post
Tirant
Veteran Member
Join Date: Jul 2008
Location: Los Angeles, California
Old 10-09-2012 , 07:23   Re: Array Copy Stock
Reply With Quote #36

Quote:
Originally Posted by josephpeter1 View Post
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.
__________________

PM me if you're interested in buying the Credits addition for Base Builder
Battlefield Rebirth [66% done]
Call of Duty: MW2 [100% done]
Base Builder [100% done]
Tirant is offline