Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <filesystem>
  2. #include <iostream>
  3. #include <string>
  4. #include <algorithm>
  5.  
  6. int main()
  7. {
  8. const std::string path = "/proc/";
  9. for(const auto& entry : std::filesystem::directory_iterator(path))
  10. {
  11. if(std::all_of(entry.path().begin(), entry.path().end(), ::isdigit))
  12. std::cout << entry.path() << '\n';
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement