Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>getenv</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
getenv

Usage

   #include <stdlib.h>
   char *getenv(const char *name);

   ANSI

Description

   getenv searches the environment list for a string of the form
   "NAME=value" and returns a pointer to the value string, if such a string
   is present. The NAME string should be capitalized.

Example 

   #include <stdio.h>
   #include <stdlib.h>

   int main()
   {
       char *path;
       path = getenv("PATH");
       printf("PATH = %s\n",path);
       return EXIT_SUCCESS;
   }

Return Value

   Returns a pointer to the value string of an environment variable. A
   return value of NULL indicates the name was not found in the environment.





Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson