Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 222
  • Last Modified:

How to make a CGI using C++?

I need some help about how i can get the environment and how to organize these data.
0
chuckwicked
Asked:
chuckwicked
1 Solution
 
trestanCommented:
I would like to suggest you to find sth. readly available at:
http://geocities.com/SiliconValley/Network/9353/

0
 
kellyjjCommented:
You can retrieve any enviroment var by using the command  
getenv()   You  pass it the var you want.  For example, if you wanted the path,  

char *ptr;
ptr=getenv(PATH);

If there is an error the ptr is NULL.

This will also work for any env var, even if it is a software kind.  

To set it, you use the putenv()

you pass it the value you want to set.

for example,

ptr="PATH=C:\dos"

putenv(ptr);


I hope this helps.

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now