httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Bray" <>
Subject Re: [users@httpd] How can I write a cgi using c/c++?
Date Tue, 10 Jul 2007 06:27:32 GMT
On 10/07/07, ying lcs <> wrote:
> Can you please tell me what is the easiest way to write a cgi using c/c++?
> I am coming from Tomcat servlet environment,  I would like to know how
> can I do a cgi using c/c++ in apache?


#include <stdio.h>
int main (void)
  printf("Content-Type: text/html\n\n");
  printf("Hello, world"):
  return 0;


#include <iostream>
int main (void)
  cout << "Content-Type: text/html\n\n";
  cout << "Hello, world";
  return 0;

Is that what you meant, or do you have a meaningful question? The
point is, there's no difference in CGI writing in any particular
language, you just have to know how to interogate the environment
variables, stdin & stdout.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message