Table of Contents        Previous topic       Next topic       

C COMPILER LIBRARY FUNCTIONS->Detailed Descriptions->memcpy()


#include <string.h>

char *memcpy(void *dest,void* src, size_t count);Copy characters from one buffer to another


destPointer to buffer to copy to
srcPointer to buffer to copy from
countNumber of characters to copy


This function copies count bytes from src to dest.  If the source and destination buffers overlap, then the function does not guarantee that the original bytes in the overlapping region will be copied before they are overwritten.  Use memmove() for overlapping buffers.

Return Value

The function returns a pointer to the start of the start of the destination buffer.