Copies characters between buffers.
void *memcpy( void *dest, const void *src, size_t count ); wchar_t *wmemcpy( wchar_t *dest, const wchar_t *src, size_t count );
- New buffer.
- Buffer to copy from.
- Number of bytes to copy.
The value of dest.
Copies count bytes of src to dest. If the source and destination overlap, the behavior of memcpy is undefined. Use memmove to handle overlapping regions.
Security Note Make sure that the destination buffer is the same size or larger than the source buffer. For more information, see Avoiding Buffer Overruns.
|memcpy||<memory.h> or <string.h>||ANSI, Win 98, Win Me, Win NT, Win 2000, Win XP|
|wmemcpy||<wchar.h>||ANSI, Win 98, Win Me, Win NT, Win 2000, Win XP|
For additional compatibility information, see Compatibility in the Introduction.
All versions of the C run-time libraries.
See memmove for a sample of how to use memcpy.