CGI with C/C++

How do you write CGI scripts in C/C++? I've looked all over the net, and everyone says that you can do it, but no one actually shows you how.  Could someone send me a small bit of source code that shows some text and a small graphic as examples.  Also, could you show me how to compile it and set it up on the web(what directories I'm allowed to put the file in)?  I'm running Win NT or Linux.  I'd prefer if you'd show me how to do it in Linux, though. Thankyou in advance,
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

marc_adamAuthor Commented:
Edited text of question.
Is there compelling reason that you want to do them in C?  

If you really must, there are some libraries that may help you.  I believe one is called cgicc:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial

It's a bettter to use PHP, it's a lot like C/C++ but can be embedded in the pages. It also is a lot safer to use, as it's easy to create vunerable cgi-programs i C/C++ (tiny bug -> buffer overflow-> root-access -> site hacked...).

You find PHP on:

I have written a huge site in C and think that there are some cases where it is by far the best language.  The real problem is that many web-managers do not allow C on their systems, having security concerns.

Certainly, if you need speed, and features not easily available in perl, C is tough to beat.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.