This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Environment variable doubt
- From: "Ashay Shende" <ashende at cisco dot com>
- To: "Gcc-Help" <gcc-help at gcc dot gnu dot org>
- Date: Mon, 29 Sep 2003 10:52:36 +0530
- Subject: Environment variable doubt
- Reply-to: <ashende at cisco dot com>
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