摘要:
参考自《Linux程序设计》第二版 P137#include #include #include #include int main(void){ FILE *pfile; pfile = fopen("/home/kkk", "r"); if(!pfile){ ... 阅读全文
随笔档案-2013年2月18日
errno的基本用法
2013-02-18 21:49 by jediael, 198 阅读, 收藏,
摘要:
error是一个包含在中的预定义的外部int变量,用于表示最近一个函数调用是否产生了错误。若为0,则无错误,其它值均表示一类错误。perror()和strerrot()函数可以把errno的值转化为有意义的字符输出。#include #include #include #include #inclu... 阅读全文
Linux系统常用目录操作函数
2013-02-18 16:44 by jediael, 156 阅读, 收藏,
摘要:
参考《Linux程序设计》第二版P103扫描目录:#include #include #include #include #include #include #include void printdir(char *dir, int depth);int main(void){ printf(... 阅读全文
浙公网安备 33010602011771号