I'm using WSL in VScode and getting error "identifier "DT_REG" is undefined" even when I included <dirent.h>. But I can still run this code, so I thought it's because of IntelliSense.
This is my code:
DIR *dir = opendir(argv[1]);
struct dirent *entry;
while ((entry = readdir(dir)) != NULL)
{
if (entry->d_type == DT_REG)
{
}
}
I tried changing intellisense mode, but I still get that error