Question

I work on windows and MacOS, I would like to get environment variables. How to get system environment variables using boost library?

Are there equivalent to System.Environment.GetEnvironmentVariable() from .Net ?

Was it helpful?

Solution

There's no need for Boost. Use std::getenv from <cstdlib>, which is a standard C++ function.

OTHER TIPS

You probably want a plain c (and ++) getenv() function, it needs not to be boosted.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top