env.cpp 143 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 #include <cstdlib> #include <iostream> int main() { if (const char *env_p = std::getenv("FOO")) std::cout << "FOO=" << env_p << '\n'; }