Whats the difference between....
memcpy & memmove?
I looked it up on MSDN library and from their example I couldn''t find a difference!!
Can anyone explain the difference? thanks in advance.
Yes! There are kangaroos in Australia but I haven't seen them...yet
The differnece is that the memory buffers can''t overlap with memcpy. For example you have and array and you want to copy data from one part of the array to another, the section you want to copy may overlap, memcpy can cause an error if you do this. memmove on the otherhand is safe, it checks to see if the buffers overlap, and will adapt. Because of the check memmove is a tad slower than memcpy. If you know the buffers won''t overlap use memcpy, otherwise use memmove.
-Omalacon
-Omalacon
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement