memcpy()                 Copy Characters between Buffers
 
 #include   <memory.h>                   Required for declarations only
 #include   <string.h>                   Use either string.h or memory.h
 
 char       *memcpy(dest,source,cnt);
 char       *dest;                       Pointer to destination
 char       *source;                     Pointer to source
 unsigned   cnt;                         Number of characters
 
    memcpy() copies 'cnt' characters from 'source' to 'dest'.  If part of
    'dest' and 'source' overlap, so that there is danger of 'source'
    being overwritten as the copy proceeds, memcpy() ensures that the
    original 'source' characters are copied before being overwritten.
 
    Returns:    A pointer to 'dest'.
 
  -------------------------------- Example ---------------------------------
 
    The following statement copies 100 characters from 'from_buffer' to
    'to_buffer'.
 
         #include <memory.h>
 
         char *buffr1, *buffr2;
 
         main()
         {
             memcpy(to_buffer,from_buffer,100);
         }

Seealso:



This page last updated on Fri Nov 30 10:48:32 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster