Chinaunix首页 | 论坛 | 博客
  • 博客访问: 462672
  • 博文数量: 206
  • 博客积分: 4030
  • 博客等级: 上校
  • 技术积分: 1852
  • 用 户 组: 普通用户
  • 注册时间: 2008-02-29 15:33
文章分类

全部博文(206)

文章存档

2010年(44)

2009年(75)

2008年(87)

我的朋友

分类: LINUX

2008-03-25 10:19:19

百度百科
 
  原型:extern void *memcpy(void *dest, void *src, unsigned int count);
  用法:#include
  
  功能:由src所指内存区域复制count个字节到dest所指内存区域。
  
  说明:src和dest所指内存区域不能重叠,函数返回指向dest的指针。
  
  举例:
      // memcpy.c
      
      #include
      #include
      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;
      }
阅读(422) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~