![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C函数使用类
F_GSong
这个作者很懒,什么都没留下…
展开
-
struct stat 的用法
转自:http://yijiuzai.blog.163.com/blog/static/1037567272010101823657458///! 需要包含de头文件#include #include int stat(const char *filename, struct stat *buf); //! prototype,原型 struct stat{转载 2012-02-19 20:39:28 · 621 阅读 · 0 评论 -
变参函数之va_start用法
此文转自别人博客,感谢原作者1:当无法列出传递函数的所有实参的类型和数目时,可用省略号指定参数表void foo(...);void foo(parm_list,...);2:函数参数的传递原理函数参数是以数据结构:栈的形式存取,从右至左入栈.eg:先介绍一下可变参数表的调用形式以及原理:首先是参数的内存存放格式:参数存放在内存的堆栈段中,在执行函数的时候,从最后一个开转载 2012-02-11 14:22:18 · 1161 阅读 · 0 评论 -
C语言中time函数【转载】
C语言中time函数【转载】转自:http://www.examda.com/ncre2/C/jichu/20100825/08150493.html C/C++中的日期和时间 头文件 time.h 函数用途 函数名 得到处理器时间 clock 得到时间差 difftime 设置时间 mktime 得到时间 time 得到以A转载 2012-02-11 18:11:31 · 719 阅读 · 0 评论 -
rand()和srand()函数
函数rand()是真正的随机数生成器,而srand()会设置供rand()使用的随机数种子。函数rand()会返回一个处于0和你所指定的数值(缺 省为1)之间的分数。如果你在第一次调用rand()之前没有调用srand(),那么系统会为你自动调用srand()。 srand((unsigned)time(NULL))则使用系统定时/计数器的值做为随机种子,所以,在相同的平台环境下,显转载 2013-01-09 16:50:04 · 718 阅读 · 0 评论