Question
Please fix the error on the c++ program! #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace cgicc;
Please fix the error on the c++ program!
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
using namespace cgicc;
int main ()
{
Cgicc cgi;
Cgicc formData;
bool biking_flag, reading_flag, fishing_flag, swimming_flag;
const_cookie_iterator cci;
std::cout << "HTTP_ACCEPT_LANGUAGE\ten-US,en;q=0.9 ";
std::cout << "HTTP_CONNECTION\tkeep-alive ";
std::cout << "HTTP_HOST\tobi.kean.edu ";
std::cout << "HTTP_USER_AGENT\tMozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Edg/111.0.1661.62 ";
std::cout << "QUERY_STRING\t ";
std::cout << "REMOTE_ADDR\t10.136.32.118 ";
std::cout << "REMOTE_PORT\t61952 ";
std::cout << "REQUEST_METHOD\tGET ";
std::cout << "REQUEST_URI\t/~manoranl/cgi-bin/CPS3525/p2test1 ";
std::cout << "HTTP_REFERER\thttp://obi.kean.edu/~manoranl/courses/CPS3525/p2test1.html ";
std::cout << "CPS 3525 project 3 test 2 ";
std::cout << "Using GET Method in C++ ";
std::cout << "Number 1: 1 ";
std::cout << "Number 2: 2 ";
std::cout << "Sum of 1+2 = 3 ";
std::string name = std::getenv("QUERY_STRING");
std::string sex = std::getenv("QUERY_STRING");
std::string age = std::getenv("QUERY_STRING");
std::string gpa = std::getenv("QUERY_STRING");
std::string birthday = std::getenv("QUERY_STRING");
std::string interests = std::getenv("QUERY_STRING");
std::string dropdown = std::getenv("QUERY_STRING");
std::string textarea = std::getenv("QUERY_STRING");
std::cout << "Name: " << name << std::endl;
std::cout << "Sex: " << sex << std::endl;
std::cout << "Age: " << age << std::endl;
std::cout << "GPA: " << gpa << std::endl;
std::cout << "Birthday: " << birthday << std::endl;
std::cout << "Interests: " << interests << std::endl;
std::cout << "Dropdown: " << dropdown << std::endl;
std::cout << "Textarea: " << textarea << std::endl;
std::cout << "Content-type: text/html ";
std::cout << "
std::cout << "
Web Inputs
";std::cout << "
Name: " << name << "
";std::cout << "
Sex: " << sex << "
";std::cout << "
Age: " << age << "
";std::cout << "
GPA: " << gpa << "
";std::cout << "
Birthday: " << birthday << "
";std::cout << "
Interests: " << interests << "
";std::cout << "
Dropdown: " << dropdown << "
";std::cout << "
Textarea: " << textarea << "
";std::cout << "";
std::cout << "Set-Cookie:Path = /perl; ";
std::cout << "Set-Cookie:UserID = XYZ; ";
std::cout << "Set-Cookie:Password = XYZ123; ";
std::cout << "
" << cci->getName() << " | "; cout << cci->getValue(); cout << " |