memcpy. McGraw-Hill The Complete Reference Fourth Edition
إعلان
إعلان
728
C + + : T h e C o m p l e t e R e f e r e n c e
The memcmp( ) function compares the first count characters of the arrays pointed to by buf1 and buf2.
The memcmp( ) function returns an integer that is interpreted as indicated here:
Value
Less than zero
Zero
Greater than zero
Meaning
buf1 is less than buf2.
buf1 is equal to buf2.
buf1 is greater than buf2.
Related functions are memchr( ), memcpy( ), and strcmp( ).
memcpy
#include <cstring> void *memcpy(void * to, const void *from, size_t count);
The memcpy( ) function copies count characters from the array pointed to by
from into the array pointed to by to. If the arrays overlap, the behavior of memcopy( ) is undefined.
The memcpy( ) function returns a pointer to to.
A related function is memmove( ).
memmove
#include <cstring> void *memmove(void * to, const void *from, size_t count);
The memmove( ) function copies count characters from the array pointed to by from into the array pointed to by to. If the arrays overlap, the copy will take place correctly, placing the correct contents into to but leaving from modified.
The memmove( ) function returns a pointer to to.
A related function is memcpy( ).
تنزيل
إعلان