int main(int argc, char **argv, char **envp)

envp:

The envp array, which is a common extension in many UNIX® systems【#1】, is used in Microsoft C++. It is an array of strings representing the variables set in the user's environment. This array is terminated by a NULL entry【#2】.
It can be declared as an array of pointers to char (char *envp[ ]) or as a pointer to pointers to char (char **envp). If your program uses wmain instead of main, use thewchar_t data type instead ofchar【#3】.
The environment block passed to main and wmain is a "frozen" copy of the current environment【#4】. If you subsequently change the environment via a call to putenv or _wputenv, the current environment (as returned by getenv/_wgetenv and the _environ/ _wenviron
variable) will change, but the block pointed to by envp will not change. See Customizing Command Line Processing for information on suppressing environment processing. This argument is ANSI compatible in C, but not in C++【#5】

转载地址:http://www.xuebuyuan.com/1512215.html

你可能感兴趣的:(语言_cc++)