Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<sys/stat.h>
  3. #include<dirent.h>
  4.  
  5. int main(int argc, char *argv[])
  6. {
  7. DIR *dp;
  8. struct dirent *sd;
  9. dp = opendir(argv[1]);
  10. while ((sd = readdir(dp)) != NULL) {
  11. printf("%sn", sd->d_name);
  12. }
  13. closedir(dp);
  14. }
  15.  
  16. struct myStructure {
  17. int number;
  18. char name[10];
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement