array copy/ref question
Brian Sturk
bsturk at comcast.net
Mon Aug 11 18:20:32 PDT 2008
Lars Ivar Igesund Wrote:
> Brian Sturk wrote:
>
> > I'm trying to get a handle on the array assignment, slicing operations and
> > am a little confused. The last copy gives me an "overlapping array copy".
> > Both arrays have a length of 4. Is it that I cannot copy from one
> > dynamic array to another (even if the same size)?
>
> It means you are trying to copy from the same memory you are copying to -
> your arrays reference the same memory.
Hi there,
Thanks for the clarification, sounds like I need to do a memcpy to do a true copy.
~telengard
More information about the Digitalmars-d
mailing list