📜  c++ 主要环境变量 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:45.576000             🧑  作者: Mango

代码示例1
// the third parameter (envp) is a NULL terminated array of NULL terminated strings
int main(int argc, char **argv, char **envp)
{
  for (char **env = envp; *env != 0; env++)
  {
    char *thisEnv = *env;
    printf("%s\n", thisEnv);    
  }
  return 0;
}