J
Jrdman
hi.
i wrote that code to list the files existed in "c:\" but it doesn't
seem to work cuz when i excute it it dosn't list all the exitsed files
in "c:\"
can someone tell me what's wrong ?
thanks.
#include<stdio.h>
#include<dir.h>
#define FILE_NOT_FOUND (-1)
int main(int argc,char *argv[])
{
_finddata_t finddata;
long hfile;
hfile=_findfirst("c:\*.*",&finddata);
while(_findnext(hfile,&finddata)!= FILE_NOT_FOUND){
printf("%s\n",finddata.name);
}
_findclose(hfile);
getchar();
return 0;
}
i wrote that code to list the files existed in "c:\" but it doesn't
seem to work cuz when i excute it it dosn't list all the exitsed files
in "c:\"
can someone tell me what's wrong ?
thanks.
#include<stdio.h>
#include<dir.h>
#define FILE_NOT_FOUND (-1)
int main(int argc,char *argv[])
{
_finddata_t finddata;
long hfile;
hfile=_findfirst("c:\*.*",&finddata);
while(_findnext(hfile,&finddata)!= FILE_NOT_FOUND){
printf("%s\n",finddata.name);
}
_findclose(hfile);
getchar();
return 0;
}