How to get system environment variables using boost library?

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

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

+6
source share
2 answers

No need for boost. Use std::getenv from <cstdlib> , which is a standard C ++ function.

+17
source

You probably need a simple c (and ++ ) getenv() function, you don't need to raise it.

+3
source

Source: https://habr.com/ru/post/905902/


All Articles