I had a question which i found an answear to on the
FAQ however C is my first programming language and i
dont really understand it all. Can somebody explain
a few things please.
This is the code i found;
I guess i just wanna understand how the code works and how i can chage the directory
* This program displays the names of all files in the current directory.
DIR *d; /*what does this mean?*/
struct dirent *dir;
d = opendir("."); /* and this*/
while ((dir = readdir(d)) != NULL)
printf("%s\n", dir->d_name); /* and this (dir->d_name)*/
it looks into.