【C / C ++】 【memcpy】 Usage

Function prototype

void *memcpy(void *destin, void *source, unsigned n);

parameter

destin-- points to the target array used to store the copied content, the type is cast to a void * pointer.
source-- points to the data source to be copied, the type is cast to a void * pointer.
n--The number of bytes to be copied.

return value

This function returns a pointer to the target storage area destin.

Features

Copy n bytes from the beginning of the memory address pointed to by the source to the beginning of the memory address pointed to by the destination destin.

Required header files

C语言:#include<string.h>
C++:#include<cstring>

Source: Baidu Encyclopedia

Published 70 original articles · Likes0 · Visits 1705

Guess you like

Origin blog.csdn.net/weixin_44807751/article/details/104411028