小甲鱼老乌龟
。
asdas
终于写完了...
真的很棒,感谢分享
Good
..
{:5_91:}
244
111
1
111
太难了
本帖最后由 拖延症大叔 于 2020-2-12 16:40 编辑
哎上来大多数没成功都是单词输错了 这是个心细的活啊{:10_250:}
为啥我的数不对啊{:10_266:}
复制了下原来的也是结果202为什么啊{:10_258:}
test01.c: In function ‘findAllDirs’:
test01.c:65: error: ‘entry_’ undeclared (first use in this function)
test01.c:65: error: (Each undeclared identifier is reported only once
test01.c:65: error: for each function it appears in.)
test01.c:65: error: ‘d_name’ undeclared (first use in this function)
test01.c:81:8: warning: multi-character character constant
test01.c:81: warning: passing argument 1 of ‘chdir’ makes pointer from integer without a cast
/usr/include/unistd.h:494: note: expected ‘const char *’ but argument is of type ‘int’
、
void findAllDirs(const char *path)
{
DIR *dp;
struct dirent *entry;
struct stat statbuf;
if((dp = opendir(path)) == NULL)
{
fprintf(stderr, "The path %s is wrong! \n",path);
return;
}
chdir(path);
while ((entry = readdir(dp)) != NULL )
{
lstat(entry->d_name, &statbuf);
if(!strcmp(".",entry->d_name) || !strcmp("..",entry_>d_name))
continue;
if(S_ISDIR(statbuf.st_mode))
{
findAllDirs(entry->d_name);
123
....
..+
{:5_90:}
0行