[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
CppMemmove
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
CppMemmove
(C++) memmove
Standard function defined in cstdlib.h.Syntax
void * memmove ( void * target, const void * source, size_t nBytes );
Example
int main() { char one[] = "ONE"; //one cannot be const, as it will be memmoved over const char two[] = "TWO"; //two can be const as it will be copied from std::memmove(one,two,3); //copy content of two over one assert( std::memcmp(one,"TWO",3) == 0); //one will have the content "TWO" assert( std::memcmp(two,"TWO",3) == 0); //two will have the same content }
- include <cstdlib>
- include <cassert>
'memmove' links
Code links
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
