|
|
||||
|
|
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
----- |
|
||