Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ main environment variables

// 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
", thisEnv);    
  }
  return 0;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #main #environment #variables
ADD COMMENT
Topic
Name
5+6 =