how to copy an array?
BlitzMax Forums/BlitzMax Beginners Area/how to copy an array?
| ||
Hi folks, how can I copy an multidimensional array? I just found "slices", but that just works on 1d-arrays... |
| ||
If its an array of one of the basic types (int,float, etc) you should be able to use MemCopy. |
| ||
You can't just use a single memcopy. For each dimension in the array you have separate memory spaces. The first dimension is all in one memory space. But then each array pointed to by the first array has its own memory space. You have to write a loop to do the copy in parts. |
| ||
grable is correct, just use memcopy... |