Listing 3: Code fragment demonstrating cgiHTMLHelper methods


// write out the content type and HTML header
cgiHTMLHelper html(cout);
html.contentType();    // defaults to text/html
html.header("Sample document");

// document body
cout << htmlpara
     << "This is a sample document generated by a" << endl
     << htmlbold << "CGIFramework" << htmlendbold
     << " program." << endl;

// write out the HTML trailer
html.trailer();

//End of File