What is the header for following variables?
Dear All,
I want list all the files in directory...following program i have copied from FAQ i am getting following errors..
error-. fatal error C1083: Cannot open include file: 'dirent.h': No such file or directory
Code:
#include <DIRECT.H>
#include <stdio.h>
#include <windows.h>
#include <dirent.h>
int main(void)
{
DIR *d;
struct dirent *dir;
d = opendir(".");
if (d)
{
while ((dir = readdir(d)) != NULL)
{
printf("%s\n", dir->d_name);
}
closedir(d);
}
return(0);
}
i am using VC++ compiler and windows2000 operating system..