|
![]() | 作者: bjhjf007 [bjhjf007]
![]() |
登录 |
#include <sys/types.h> #include <dirent.h > #include "ourhdr.h" int main(int argc,char *argv[]) { DIR *dp; struct dirent *dirp; if (argc !=2) err_quit("a single argument (the directory name)isrequired"); if ((dp = opendir(argv[1]))==NULL) err_sys("can't open %s",argv[1]); while ((dirp=readdir(dp)) !=NULL) printf("%s\n",dirp->d_name); closedir(dp); exit(0); } 这个程序是 《unix环境高级编程》里的第一个程序例子 ,可是我怎么就是不能调试成功呀 报错: myls.c:2: dirent.h : No such file or directory myls.c:3: ourhdr.h: No such file or directory 谁能帮我解释一下呀? [此贴被 雨花石(bjhjf007) 在 06月06日20时49分 编辑过] [此贴被 286(unique) 在 06月07日09时10分 编辑过] |
地主 发表时间: 04-06-06 18:44 |
![]() | 回复: 286 [unique] ![]() |
登录 |
myls.c:2: dirent.h : No such file or directory myls.c:3: ourhdr.h: No such file or directory 没有上面的两个头文件。 |
B1层 发表时间: 04-06-07 09:11 |
|
20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon
粤ICP备05087286号