Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>memcpy() copy characters between buffers</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 memcpy()                Copy Characters between Buffers

 #include   <mem.h>                      Required for declarations only
 #include   <string.h>                   Use either string.h or memory.h

 void       *memcpy(dest,source,cnt);
 void       *dest;                       Pointer to destination
 const void *source;                     Pointer to source
 size_t     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() does nothing to
    protect the data integrity of 'source' or 'dest'.  Use memmove() if
    integrity is important.

       Returns:     A pointer to 'dest'.

   -------------------------------- Example ---------------------------------

    The following statements copy 100 characters from 'from_buffer' to
    'to_buffer'.

           #include <mem.h>

           char *buffr1, *buffr2;

           main()
           {
               memcpy(to_buffer,from_buffer,100);
           }


See Also: memccpy() memchr() memcmp() memset() memmove()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson