Programming Tips - C/C++: Why isn't my putenv() working?

Date: 2010apr28 Language: C/C++ Q. C/C++: Why isn't my putenv() working? A. You probably need to make a duplicate like this:
putenv(strdup(s));
if your assignment, s, is a local variable.