The cgic Library

cgic is a CGI library for C written by Thomas Boutell ( Like and, it is used to decode data submitted by the user and make it available within your CGI program. The only difference is that this library is written to work with C programs instead of programs written in Perl or any other language.

Before you can use cgic, you have to import it into your C program. Generally, it is loaded into your CGI program using a line like:

#include "cgic.h" 

Programs written to work with cgic differ from standard C programs in some ways. All C programs must contain a function named main() in order to compile and execute properly. When you write programs that use cgic, you eliminate the main() ...

Get Sams Teach Yourself CGI in 24 Hours, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.