草庐IT

c++ - TCHAR* envp[] : What is it?

我用VisualStudio创建了一个VC++控制台项目,它自动生成了这个函数:int_tmain(intargc,TCHAR*argv[],TCHAR*envp[]){...}我只是想知道envp代表什么以及如何/何时可以/应该使用它?谢谢! 最佳答案 上面的envp参数将存储环境变量。Theenvparray,whichisacommonextensioninmanyUNIX®systems,isusedinMicrosoftC++.Itisanarrayofstringsrepresentingthevariablesseti