memmove函数使用时注意的问题

首先,来了解一下memmove函数的声明类型,Linux c中的定义如下:

#include <string.h>
void *memmove(void *dest, const void *src, size_t n);

Description

 The memmove() function copies n bytes from memory area src to memory area dest. The memory areas may overlap.

把src所指的内存内容移动到dest指向的内存位置。

Return Value

The memmove() function returns a pointer to dest.

使用时注意的问题是:拷贝从低字节向高字节方向拷贝

posted @ 2011-03-28 14:35  qi09  阅读(1016)  评论(0编辑  收藏  举报