Will eine kleine cgi lib geschrieben, bekomme aber wenn ich sie aufrufe einen fehler zurück:

index.cgi output
Code:
./index.cgi
Content-Type:text/html


<html>
<head>
<title></title>
</head>
<select name="Formselect1"<option>Forminput</option> <option>Forminput1</option> <option>Forminput2</option>method="GET"action="./cgi-bin/index.cgi">
Segmentation fault
index.cpp
Code:
#include <iostream>
#include "index.h"
#include <dlfcn.h>
#include <tuxcms/css.h>
#include <tuxcms/libhtml++.h>
#include <string>

using namespace std;

int main(int argc, char **argv)
{
string sitename;
cout << "Content-Type:text/html\n\n" << endl
     << "<html>" << endl
     << "<head>" << endl
     << "<title>" << sitename << "</title>" << endl
     << "</head>" << endl;
htmlformselect::htmlformselect("Formselect1", "[F]Forminput[/F] [F]Forminput1[/F] [F]Forminput2[/F]", "GET");
cout << "<body>" << endl
     << "<h1><em>" << endl
     << "Im Aufbau" << endl
     << "</em></h1>" << endl
     << "</body>" << endl
     << "</html>"<< endl;
}
libhtml++.h
Code:
#include <iostream>
#include <string>
#include <sstream>

class htmlformselect 
{
private:
std::string formselectinputprint;
std::string formselectname;
std::string formselectinput;
std::string methodform;
void formselectdisplay(std::string formselectname, std::string formselectinput, std::string methodform);
std::string anfrage(std::string methodform);

public:
std::string formselectoutput;
htmlformselect(std::string formselectname, std::string formselectinput, std::string methodform)
{
formselectdisplay(formselectname, formselectinput, methodform );
anfrage(methodform);
//std::cout << formselectoutput << std::endl; 
} 


};
cgi.cpp
Code:
#include <iostream>
#include <string>
#include <fstream>
#include <cstdlib>
#include "include/libhtml++.h"

using namespace std;

std::string htmlformselect::anfrage(std::string methodform )
{
if (methodform == "GET")
{
formselectoutput = getenv("QUERY_STRING");
return formselectoutput;
}

else if (methodform =="POST")
{
return formselectoutput;
}

else
{

}

}