读取的代码方式如下:
int main()
{
long file;
struct _finddata_t find;
_chdir("d:\\");
if((file=_findfirst("*.*", &find))==-1L)
{
printf("空白!\n");
exit(0);
}
printf("%s\n", find.name);
while(_findnext(file, &find)==0)
{
printf("%s\n", find.name);
}
_findclose(file);
return 0;
}