how find out header "environ" on mac? want include in project. thank you! https://developer.apple.com/library/mac/documentation/darwin/reference/manpages/man7/environ.7.html
there no header file; manage says need declare yourself:
#include <iostream> extern char **environ; int main() { (unsigned = 0; environ[i]; i++) std::cout << environ[i] << std::endl; return 0; } you might better off sticking genenv() , setenv() unless need wholesale manipulation, example, before passing child process.
Comments
Post a Comment