The environment variable is made as follows: Variable = associated value.
In the WindWos2000, open the control panel, double-click System, select Environment Variables in "Advanced", you can see two dialogs, "User Variables" above "Administrator", below is "system variable", set some System parameters. You can double-click to set it.
Environment variables can also be accessed in the program, and the environment variable is read with the getENV () function. The prototype is char * getenv (const char * name); Usage such as char * r = getenv ("incrude"); additional Putenv () The function sets the environment variable, its prototype is int Putenv (const char * var); Usage If int REC = Putenv ("Temp = C: // Temp"); if the variable already exists, this function overwrites the original value, So if you don't want to override the value of the current variable, it is best to call GetEnv () to check if the variable exists, and then call Putenv ().