SHARE
TWEET

Untitled

a guest Feb 21st, 2020 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top