Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) std::getenv

 

std::getenv is an STL function to obtain an environmental variable.

 

#include <cstdlib>
#include <iostream>
#include <string>

int main()
{
  const std::string s = std::getenv("PATH");
  std::cout << s << '\n';
}

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict