上一页 1 ··· 12 13 14 15 16

2015年5月13日

调用函数实现整数和字符串的互转以及手动实现该功能 ----- _itoa, atoi

摘要: 1 #define _CRT_SECURE_NO_WARNINGS 2 #include 3 #include 4 #include 5 6 int myatoi(char *str);// 手动实现 字符串 转 整数 7 8 char * myitoa(int num, char * str... 阅读全文

posted @ 2015-05-13 10:49 Dragon-wuxl 阅读(152) 评论(0) 推荐(0)

调用函数实现字节拷贝以及手动使用下标法和指针法实现 ------ _memccpy

摘要: 1 #include 2 #include 3 #include 4 5 /* 6 函数名: _memccpy 7 功 能: 从源source中拷贝n个字节到目标destin中,遇到字符 ch 就提前结束; 8 用 法: void *memccpy(void *des... 阅读全文

posted @ 2015-05-13 09:02 Dragon-wuxl 阅读(154) 评论(0) 推荐(0)

2015年5月12日

从buf所指内存区域的前count个字节查找字符ch以及手动使用指针法和下标法实现 ------ memchr

摘要: 1 #include 2 #include 3 #include 4 #include 5 6 /* 7 功能:从buf所指内存区域的前count个字节查找字符ch。 8 9 说明:当第一次遇到字符ch时停止查找。如果成功,返回指向字符ch的指针;否则返回NULL。10 */1... 阅读全文

posted @ 2015-05-12 16:46 Dragon-wuxl 阅读(203) 评论(0) 推荐(0)

比较内存区域buf1和buf2的前count个字节但不区分字母的大小写及手动使用指针法实现 ------ _memicmp

摘要: 1 #include 2 #include 3 #include 4 #include 5 6 // _memicmp 判定这片内存内容相同还是不同 7 8 int pointmemicmp(const void * _Buf1, const void * _Buf2, size_t _... 阅读全文

posted @ 2015-05-12 16:25 Dragon-wuxl 阅读(487) 评论(0) 推荐(0)

调用函数实现内存拷贝以及手动实现内存拷贝 ------ memmove

摘要: 1 #include 2 #include 3 #include 4 #include 5 6 7 // memmove 是按整体拷贝 memcpy 是按字节拷贝 8 void * mymemmove(void * _Dst,const void * _Src,size_t _Size);... 阅读全文

posted @ 2015-05-12 14:53 Dragon-wuxl 阅读(181) 评论(0) 推荐(0)

调用函数实现内存清零以及手动使用下标法和指针法实现内存清零 ------ memset

摘要: 1 #include 2 #include 3 #include 4 5 void * indexmemset(void * _Dst, int _Val, size_t _Size);// 下标法实现数据清零 6 void * pointmemset(void * _Dst, int _Val... 阅读全文

posted @ 2015-05-12 11:32 Dragon-wuxl 阅读(272) 评论(0) 推荐(0)

调用函数实现内存拷贝以及手动使用下标法和指针法实现内存拷贝 ------ memcpy

摘要: 1 #include 2 #include 3 #include 4 5 6 void * indexmemcpy(void * _Dst,const void * _Src, unsigned int _Size);// 下标法自己实现内存拷贝 7 void * pointmemcpy(vo... 阅读全文

posted @ 2015-05-12 10:58 Dragon-wuxl 阅读(205) 评论(0) 推荐(0)

2015年5月11日

二级指针之锯齿数组

摘要: #include #include #define N 10void main(){ int **pp = malloc(sizeof(int *)*(2 * N - 1)); for (int i = 0; i < N;i++) { pp[i] = malloc(sizeof(int... 阅读全文

posted @ 2015-05-11 10:45 Dragon-wuxl 阅读(168) 评论(0) 推荐(0)

上一页 1 ··· 12 13 14 15 16

导航