我有一个简单的调用std::setenv,它在我的Linux发行版下工作正常gcc.但是,clang在我的Mac OS X上使用时,出现以下错误.
error: no member named 'setenv' in namespace 'std'; did you mean simply 'setenv'?
std::setenv(name.c_str(), value.c_str(), true);
Run Code Online (Sandbox Code Playgroud)
我敢肯定,我已经阅读了C++ 11 setenv中名称空间的一部分std,但现在我不确定.
问题:应该使用setenv还是std::setenv使用,为什么会这样?