[Home]  [Edit this page]  [Recent Changes]  [Special Pages]  [Help
CppMemmove

(C++) memmove

Standard function defined in cstdlib.h.

Syntax

void * memmove ( void * target, const void * source, size_t nBytes ); 


Example

  1. include <cstdlib>
  2. include <cassert>
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 }


'memmove' links

Code links



last edited (January 9, 2007) by bilderbikkel, Number of views: 2149, Current Rev: 7 (Diff)

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Tore Nestenius at .NET Consultant - Synchron Data.