#include "stdafx.h"
#include <stdio.h>
#include <io.h>
int main(int argc, char* argv[])
{
struct _finddata_t fd;
int hFile = _findfirst( "D:\\temp\\*.*", &fd );
if (-1 != hFile)
{
int done = 0;
while(0 == done)
{
if (_A_SUBDIR & fd.attrib)
printf ("子目录:");
printf("%s\n", fd.name);
done = _findnext( hFile, &fd );
}
_findclose( hFile );
}
return 0;
}
温馨提示:答案为网友推荐,仅供参考