Google
 
Webcprogramming.com




An Affiliate of AIHorizon




getenv()

Prototype: char *getenv(const char *atypeofinformation);
Header File: stdlib.h (C) or cstdlib (C++)
Explanation: Getenv wll return a pointer to a string that contains system information pertaining to atypeofinformation. For example, path names, or devices. This is implementation-defined, so you might need to check your compiler manual.



// Example shows the currently defined paths (usually set in autoexec.bat)
// For *nix systems, simply replace PATH with an environment variable
#include <iostream>
#include <cstdlib>

using namespace std;

int main()
{
    cout<<getenv("PATH");  
}
Other Functions

Bookmark and Share



-----
Interested in advertising with us?
Please read our privacy policy.
Copyright © 1997-2005 Cprogramming.com. All rights reserved.
Designs