Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <string.h>
- #include <stddef.h>
- #include <stdio.h>
- #include <sys/types.h>
- #include <dirent.h>
- using namespace std;
- int main (void)
- {
- char* sciezka=strdup("D:/");
- DIR *dp;
- struct dirent *ep;
- dp = opendir (sciezka);
- if (dp != NULL)
- {
- while (ep = readdir (dp)) puts (ep->d_name);
- (void) closedir (dp);
- }
- else
- {
- perror ("Nie mozna otworzyc katalogu");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement