I know that when programming in c++ I can access individual environment variables with getenv
.
I also know that, in the os x terminal, I can list ALL of the current environment variables using env
.
I'm interested in getting a complete list of the environment variables that are available to my running c++ program. Is there a c/c++ function that will list them? In other words, is there a way to call env
from my c++ code?
env
, notENV
(I've edited your question to fix that). – Gaylagayle