I am using the microsoft _findfirst, _findnext, etc functions to scan a directory for files.
These functions require the io.h file to be included.
In the io.h file, there is a structure defined that holds the data that is found:
struct _finddata_t {
unsigned int attrib;
time_t time_create;
time_t time_access;
time_t time_write;
unsigned long size;
char name[260];
};
I have written a scanning function to call _findfirst and _findnext.
My scanning function declares a variable finfo:
_finddata_t finfo;
I have included io.h before the scanning function occurs in the main.c file, but the Pelles C compiler complains (about the above code line):
error #2048: Undeclared identifier '_finddata_t'.
As an experiment, I defined the structure (exactly as above) within my scanning function itself, but I still get the very same error.
I actually copied code I had written years ago in VisStudio, and it worked there.....
Any help is much appreciated.
Thanks,
Robert