2015年5月13日

调用sprintf函数将实数打印到字符串及手动实现实数转字符串函数 ------ ftoa

摘要: 1 #define _CRT_SECURE_NO_WARNINGS 2 #include 3 #include 4 5 char *ftoa(double db, char *str);// 手动实现将实数转化为字符串 6 7 // 实数转字符串 8 void main() 9 {10 ... 阅读全文

posted @ 2015-05-13 16:43 Dragon-wuxl 阅读(637) 评论(0) 推荐(0)

调用函数实现字符串转实数以及手动实现该功能 ----- atof

摘要: 1 #include 2 #include 3 4 5 double myatof(char *str);// 手动实现 将字符串转化为实数 6 7 void main() 8 { 9 char str[30] = "123.3456";10 double db = atof... 阅读全文

posted @ 2015-05-13 14:45 Dragon-wuxl 阅读(291) 评论(0) 推荐(0)

调用函数实现整数和字符串的互转以及手动实现该功能 ----- _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)

导航