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
Whoops, I forgot that system lets you execute terminal commands.
This snippet gives me what I need:
std::cout << "List of environment variables: << std::endl; system("env");