#include <stdlib.h>
int main(int argc, char *argv[])
{
const char *tmppath = "/tmp";
const char *user = "";
/**
* in UNIX/Linux os, uses /tmp direcotry to store temp file, while in
* Windows os, using `TMP' environment variable indicate the temp directory.
*
* and using `USER' environment variable in UNIX/Linux, but in Windows os,
* it uses `USERNAME' to store logon user.
*/
#ifdef _WIN32
tmppath = getenv("TMP"); /* without the last '\\' */
user = getenv("USERNAME");
#else
user = getenv("USER");
#endif /* _WIN32 */
/* use the same `HOME' environment variable in Unix/Linux and Windows */
const char *homedir = getenv("HOME");
return 0;
}