Solved

How to make a CGI using C++?

Posted on 1998-06-18
2
205 Views
Last Modified: 2010-05-18
I need some help about how i can get the environment and how to organize these data.
0
Comment
Question by:chuckwicked
2 Comments
 
LVL 8

Expert Comment

by:trestan
Comment Utility
I would like to suggest you to find sth. readly available at:
http://geocities.com/SiliconValley/Network/9353/

0
 
LVL 2

Accepted Solution

by:
kellyjj earned 50 total points
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now