I am trying to extract an environment variable and append a string to it. This is my code:
const char* env_temp = getenv("TEMP");
char buff[1024];
strcpy(buff, env_temp);
strcat(buff, "\blahblah");
When compiling in VS 2015 I get:
error C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead.
error C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead.
error C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead.
I have tried fiddling with these to no avail (I am not a C++ programmer). Can anyone help?