Advertisement
Guest User

Untitled

a guest
Jul 18th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include <iostream>
  2. #include<experimental/filesystem>
  3. #include<filesystem>
  4. #include<fstream>
  5. #include<string>
  6.  
  7. using namespace std;
  8. using namespace experimental::filesystem;
  9.  
  10. int main()
  11. {
  12. hash<string>b;
  13. string s;
  14. unsigned long long z = 0;
  15. ofstream f("C:\\1\\List.txt");
  16. ifstream f1;
  17. for (auto i : directory_iterator("C:\\Test"))
  18. {
  19. path a = i;
  20. f1.open(i);
  21. while (!f1.eof())
  22. {
  23. getline(f1, s);
  24. z += b(s);
  25.  
  26. }
  27. f << z << " " << a.stem() << " " << file_size(a) << " " << a << endl;
  28. f1.close();
  29. }
  30.  
  31. f.close();
  32. return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement