int main(void)
{
struct ffblk ffblk;
int done;
printf("Directory listing of .\n");
done = findfirst("c:/",&ffblk,0);
while (!done)
{
printf(" %s\n", ffblk.ff_name);
done = findnext(&ffblk);
}
return 0;
}
the error i get is: the aggregate ffblk ffblk has incomplete type and cannot be defined.
I don't know what it means... can anybody help me!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2005-05-21
findfirst and findnext are not standard functions and as such you have to check the implementation specific to your library (in this case MSVCRT.DLL). It appears that you are applying a different implementation of these functions.
this is the source code:
include <stdio.h>
include <dir.h>
include <stdlib.h>
include <conio.h>
int main(void)
{
struct ffblk ffblk;
int done;
printf("Directory listing of .\n");
done = findfirst("c:/",&ffblk,0);
while (!done)
{
printf(" %s\n", ffblk.ff_name);
done = findnext(&ffblk);
}
return 0;
}
the error i get is: the aggregate ffblk ffblk has incomplete type and cannot be defined.
I don't know what it means... can anybody help me!
findfirst and findnext are not standard functions and as such you have to check the implementation specific to your library (in this case MSVCRT.DLL). It appears that you are applying a different implementation of these functions.
The Microsoft versions are described here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/crt__find.2c._wfind_functions.asp
The following works as you expect:
include <stdio.h>
include <stdlib.h>
include <io.h>
int main(void)
{
struct _finddata_t fileinfo ;
long findhandle ;
int finderror ;
}
Clifford
thank you very much!