You can use getenv and setenv C library functions to do this. In case there is a problem with C++ strings in a C function, you can refer this post from Corona688.
but i'm getting an error message of "parse error before string constant" according to my research i just have to declare #inclued <stdio.h> but the error still appear during compilation.
i also tried
int setenv(const char *DateToday, const char *20061120, int rewrite);
but it seems that it dont accept date or numerical value.
with regard to the post of Corona688, what's that all about? i'm a bit confused.
Exactly why I asked you to take a look at Corona688's post. When you putenv is a C function, so you cannot use C++ strings in it. Maybe you could declare the string before you call the function, then try something like: