Friday, November 19, 2010

memmove and memcpy

memmove:source and destination can overlap;memcpy:source and destination cannot overlap.

The weak mnemonic I use to remember this is that you can't have two exact 'ascii zero' copies after an overlapping copy.

Reference: C++ Templates by David Vandevoorde and Nicolai M. Josuttis. Addison-Wesley, 2003, p. 282

No comments:

Post a Comment