. But I can still run this code, so I thou" /> . But I can still run this code, so I thou" /> . But I can still run this code, so I thou"/>

I got the error "identifier "DT_REG" is undefined" even when using <dirent.h>. Is that because of IntelliSense?

249 Views Asked by At

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

0

There are 0 best solutions below