bug-cgicc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug report


From: Michal Sevcenko SITE
Subject: bug report
Date: Tue, 12 Mar 2002 13:17:12 +0100

Hi,

 just a small bug in the tutorial example in cgicc_tutorial.html, in the 
complete listing at the very bottom of the page:

1) you forgot to #include "cgicc/HTTPHTMLHeader.h", compiler complains (or 
do I have a configuration error?)

2) you wrote 
    ...
      // Set up the HTML document
      cout << html() << << head(title("Cgicc example")) << endl;
      cout << body() << endl;
    ...

on the middle line there is '<< <<' which is probably a bug.

The whole example reads as follows:
------------------------------------------------------------------
#include <iostream>
#include <vector>
#include <string>

#include "cgicc/Cgicc.h"
#include "cgicc/HTMLClasses.h"

using namespace std;
using namespace cgicc;

int 
main(int argc, 
     char **argv)
{
   try {
      Cgicc cgi;

      // Send HTTP header
      cout << HTTPHTMLHeader() << endl;

      // Set up the HTML document
      cout << html() << << head(title("Cgicc example")) << endl;
      cout << body() << endl;

      // Print out the submitted element
      form_iterator name = cgi.getElement("name");
      if(name != cgi.getElements().end()) {
         cout << "Your name: " << **name << endl;
      }

      // Close the HTML document
      cout << body() << html();
   }
   catch(exception& e) {
      // handle any errors - omitted for brevity
   }
}
------------------------------------------------------------------

best regards,

 Michal Sevcenko

----------------------------------------
Ing. Michal Sevcenko
Department of Computer Science
Faculty of Electrical Engineering
Czech Technical University in Prague
Tel +420 2 2435 3661
http://webis.felk.cvut.cz/en/people/sevcenm.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]