标签:style blog color io os sp div c log
#include <stdio.h> #include <sys/types.h> #include <dirent.h> int main(void) { DIR *dp; struct dirent *ep; dp = opendir ("./"); if (dp != NULL) { while ((ep = readdir (dp)) != NULL) { printf("%s %d\n", ep->d_name, ep->d_type); } (void) closedir (dp); } else { perror ("Couldn‘t open the directory"); } return 0; }
标签:style blog color io os sp div c log
原文地址:http://www.cnblogs.com/afxcn/p/3999075.html