字符串函数memcpy
来源:互联网 发布:js中的是id选择器 编辑:程序博客网 时间:2024/05/29 04:52
原型:extern void *memcpy(void *dest, void *src, unsigned int count);
用法:#include <string.h>
功能:由src所指内存区域复制count个字节到dest所指内存区域。
说明:src和dest所指内存区域不能重叠,函数返回指向dest的指针。
举例:
// memcpy.c
#include <syslib.h>
#include <string.h>
main()
{
char *s="Golden Global View";
char d[20];
clrscr();
memcpy(d,s,strlen(s));
d[strlen(s)]=0;
printf("%s",d);
getchar();
return 0;
}
相关函数:memccpy,memmove,strcpy
(摘自 http://www.ggv.com.cn/forum/clib/string/strstr.html)
用法:#include <string.h>
功能:由src所指内存区域复制count个字节到dest所指内存区域。
说明:src和dest所指内存区域不能重叠,函数返回指向dest的指针。
举例:
// memcpy.c
#include <syslib.h>
#include <string.h>
main()
{
char *s="Golden Global View";
char d[20];
clrscr();
memcpy(d,s,strlen(s));
d[strlen(s)]=0;
printf("%s",d);
getchar();
return 0;
}
相关函数:memccpy,memmove,strcpy
(摘自 http://www.ggv.com.cn/forum/clib/string/strstr.html)
- 字符串函数memcpy
- memcpy内存拷贝函数memcpy和字符串拷贝函数strcpy
- 字符串函数---memcpy()&memmove()大探秘
- C字符串函数strcmp\strcpy\strcat\memcpy
- 字符串函数strcpy,strcat,memcpy的实现
- 字符串memcpy
- 编写字符串复制函数strcpy及memcpy函数
- memcpy函数
- memcpy函数
- memcpy () 函数
- memcpy函数
- memcpy函数
- memcpy函数
- memcpy()函数
- memcpy 函数
- memcpy函数
- memcpy函数
- memcpy()函数
- 远程协助器V2.0
- .NET平台下可复用的Tcp通信层实现
- .NET平台下可复用的Tcp通信层实现
- Java加密算法(DES,MD5)
- 字符串函数memcmp
- 字符串函数memcpy
- 字符串函数memicmp
- 自从遇到了你
- 字符串函数memmove
- 字符串函数memset
- 字符串函数movmem
- wingdows server 2003安装
- 字符串函数setmem
- resin 一台主机多个端口运行不同的网站或程序