try it, then you know it____________just do it , as love easily fade.

一次只有一个目标,步子迈小些,抑制一次实现所有功能的冲动。 过程如何结果就如何,行动是欢喜的,不管是兴奋还是沮丧的情绪都对结果无益。贵在持之以恒

导航

随笔分类 -  c 库函数

vsnprintf
摘要:http://www.cplusplus.com/reference/cstdio/vsnprintf/ int vsnprintf (char * s, size_t n, const char * format, va_list arg ); Write formatted data from 阅读全文

posted @ 2016-03-04 16:20 吾一 阅读(1402) 评论(0) 推荐(0)

file access , argc, argv[ ]
摘要:_____main函数含有 两个参数 ,argc ,argv[]这两个参数用以指示命令行输入的参数信息。argc 的值是输入的参数的数量。argv是一个数组,每个数组元素指向一个string字符串类型的数据的地址,也就是存放每一个输入参数的地址。argv就是 char ** 类型。void file... 阅读全文

posted @ 2015-05-10 23:06 吾一 阅读(152) 评论(0) 推荐(0)

memcpy code
摘要:memcpy#include //#include //uintptr_t is quoted.#include "string.h"/* * sizeof(word) MUST BE A POWER OF TWO * SO THAT wmask BELOW IS ALL ONES */... 阅读全文

posted @ 2015-03-06 16:10 吾一 阅读(300) 评论(0) 推荐(0)

计时函数 clock() in c and c++
摘要:在MSDN中,查得对clock函数定义如下:clock_t clock(void) ;返回该程序从启动到函数调用占用CPU的时间。这个函数返回从“开启这个程序进程”到“程序中调用clock()函数”时之间的CPU时钟计时单元(clock tick)数,在MSDN中称之为挂钟时间(wal-clock)... 阅读全文

posted @ 2014-12-20 19:38 吾一 阅读(251) 评论(0) 推荐(0)

strtok
摘要:转载,地址在最后strtok的函数原型为char *strtok(char *s, char *delim),功能为“Parse S into tokens separated by characters in DELIM.If S is NULL, the saved pointer in SAV... 阅读全文

posted @ 2013-07-29 22:31 吾一 阅读(786) 评论(0) 推荐(0)

sscanf, sspritf
摘要:// crt_sprintf.c// compile with: /W3// This program uses sprintf to format various// data and place them in the string named buffer.#include int main(... 阅读全文

posted @ 2013-07-28 13:18 吾一 阅读(276) 评论(0) 推荐(0)

C 函数 strcpy and memcpy, strdup, memcmp,memset 库函数皆小写
摘要:void*memcpy(void*dst,constvoid*src,size_tn);//If copying takes place between objects that overlap, the behavior is undefined因此标准库提供了地址重叠时的内存拷贝函数:memmo... 阅读全文

posted @ 2013-07-15 14:41 吾一 阅读(367) 评论(0) 推荐(0)

生成随机数 random value generation
摘要:下面给出了生成随机数的函数应用,但光知道怎么用,应用中还是会出问题。知道为什么可以用,知道它是怎么来得更重要。就像数学公式,理解它的原理比用它更重要。The C programming language 会讲得比较彻底一些,告诉你它是怎么来的。 the standard libary include 阅读全文

posted @ 2013-01-15 20:39 吾一 阅读(330) 评论(0) 推荐(0)