Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1446480
  • 博文数量: 254
  • 博客积分: 8696
  • 博客等级: 中将
  • 技术积分: 2961
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-03 16:46
文章分类

全部博文(254)

文章存档

2015年(4)

2014年(18)

2013年(16)

2012年(8)

2011年(25)

2010年(2)

2009年(74)

2008年(107)

发布时间:2014-02-22 12:12:51

stat函数讲解表头文件:    #include <sys/stat.h>             #include <unistd.h>定义函数:    int stat(const char *file_name, struct stat *buf);函数说明:    通过文件名filename获取文件信息,并保.........【阅读全文】

阅读(878) | 评论(0) | 转发(0)

发布时间:2014-02-11 18:29:15

原文:http://blog.csdn.net/gdujian0119/article/details/6363574获取文件大小这里有两种方法:方法一、范例:[cpp] view plaincopyprint?unsigned long get_file_size(const char *path)  {  .........【阅读全文】

阅读(2924) | 评论(0) | 转发(0)

发布时间:2014-02-08 18:21:03

原文:http://blog.sina.com.cn/s/blog_8043547601013rxf.html1、system(执行shell命令) 相关函数 fork,execve,waitpid,popen表头文件 #include<stdlib.h>定义函数 int system(const char * string);函数说明 system()会调用fork()产生子进程,由子进程来调用/bin/sh-c string来执行参数string字符串.........【阅读全文】

阅读(3391) | 评论(0) | 转发(0)

发布时间:2014-02-08 18:14:42

原文:http://blog.csdn.net/21aspnet/article/details/6740110当linux中的C api函数发生异常时,一般会将errno变量(需include errno.h)赋一个整数值,不同的值表示不同的含义,可以通过查看该值推测出错的原因,在实际编程中用这一招解决了不少原本看来莫名其妙的问题。但是errno是一个数字,代表的具体含义还要到errno.h.........【阅读全文】

阅读(792) | 评论(0) | 转发(0)

发布时间:2013-08-29 18:43:21

使用命名空间的目的是对标识符的名称进行本地化,以避免命名冲突。在C++中,变量、函数和类都是大量存在的。如果没有命名空间,这些变量、函数、类的名称将都存在于全局命名空间中,会导致很多冲突。比如,如果我们在自己的程序中定义了一个函数toupper(),这将重写标准库中的toupper()函数,这是因为这两个函数都是位于.........【阅读全文】

阅读(922) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册