fork download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. char * path_env;
  6.  
  7. path_env = getenv("PATH"); //without a name resolve operation std::getenv()
  8.  
  9. std::cout << path_env << std::endl;
  10.  
  11. return 0;
  12. }
Success #stdin #stdout 0s 3140KB
stdin
Standard input is empty
stdout
/usr/local/bin:/usr/bin:/bin