memmove
void *  memmove ( void * dest, const void * src, size_t num );
string.h
  cplusplus.com  

Copy bytes to buffer from buffer.
  Copies num bytes from dest buffer to memory location pointed by src.
  Even if the destination and source buffers overlap the copy is correctly performed.

Parameters.

dest
Destination buffer where data is copied.
src
Source buffer to copy from.
num
Number of bytes to copy.

Return Value.
  dest is returned.

Portability.
  Defined in ANSI-C.

Example.

/* memmove example */
#include <stdio.h>
#include <string.h>

main ()
{
  char srt[] = "memmove can be very useful.....";
  memmove (str+20,str+15,11);
  puts (str);
  return 0;
}
Output:
memmove can be very very useful

See also.
  memcpy, strncpy


© The C++ Resources Network, 2000