This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Environment variable doubt


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]