I'm trying to make a test program that simply searches for any file in its root folder:
#include <stdio.h>
#include <dir.h>
#include <dos.h>
struct ffblk ffblk;
int main(){
int result = findfirst("*.*", &ffblk,FA_ARCH);
return 0;
}
But when the code compiles, the ffblk
struct
declaration returns the error:
storage size of ffblk isn't known
and the findfirst()
function returns:
warning: implicit declaration of function 'findfirst'[-Wimplicit-function-declaration]
as seen in this image, even though both findfirst
and ffblk
are members of dir.h
, which is already included. I'm using Visual Studio
and compiling with GCC
. Does someone know what is wrong with the code, or the header files?