Open directory using C
You should really post your code(a), but here goes. Start with something like: #include <stdio.h> #include <dirent.h> int main (int argc, char *argv[]) { struct dirent *pDirent; DIR *pDir; // Ensure correct argument count. if (argc != 2) { printf (“Usage: testprog <dirname>\n”); return 1; } // Ensure we can open directory. pDir = opendir … Read more