Environment variable doubt

Ashay Shende ashende@cisco.com
Mon Sep 29 05:15:00 GMT 2003


Hi,
I need some help in retrieving the values of the Environment vars from my
C++ program.

For getting the values of the Environment Variables, I am using the getenv()
function.
e.g string serverName = getenv("SERVER_NAME");

However, when i do getenv("SERVER_PROTOCOL"), it strangely returns a string
"INCLUDED" whereas I am expecting something like HTTP/0.9 or or a similar
value.  Does anyone have any idea about this ?

Also, can anyone tell me how to get the list of all the environment
variables and their values.


Thanks in advance

-Ashay





More information about the Gcc-help mailing list