C++ Programming/Code/Standard C Library/Functions/memcpy

From Wikibooks, open books for an open world
Jump to navigation Jump to search

memcpy[edit | edit source]

Syntax
#include <cstring>
void *memcpy( void *to, const void *from, size_t count );

The function memcpy() copies count characters from the array from to the array to. The return value of memcpy() is to. The behavior of memcpy() is undefined if to and from overlap.

Related topics
memchr - memcmp - memmove - memset - strcpy - strlen - strncpy