How to get system environment variables using boost library?
-
16-04-2021 - |
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 ?
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