Probleme mit libary



  • Schreibe gerade an einem cms system:
    Habe nun folgendes problem.
    Index.cgi lässt nicht mehr kompilieren seit dem ich void formselect in eine klasse verfrachtet habe.

    index.cpp

    #include <iostream>
    #include "index.h"
    #include <dlfcn.h>
    #include <tuxcms/css.h>
    #include <tuxcms/libhtml++.h>
    #include <string>
    
    using namespace std;
    
    int main()
    {
    string sitename;
    cout << "Content-Type:text/html\n\n" << endl
         << "<html>" << endl
         << "<head>" << endl
         << "<title>" << sitename << "</title>" << endl
         << "</head>" << endl;
    htmlformselect formselect("Formselect1", "[F]Forminput[/F] [F]Forminput1[/F] [F]Forminput2[/F]", "GET");
    libcssread();
    cout << "<body>" << endl
         << "<h1><em>" << endl
         << "Im Aufbau" << endl
         << "</em></h1>" << endl
         << "</body>" << endl
         << "</html>";
    }
    

    lihtmlform
    libhtml++.h

    class htmlformselect
    {
    
    public:
    void anfrage( );
    void formselect(const std::string formselectname, std::string formselectinput, std::string methodform );
    };
    
    void libcssread();
    

    formselect.cpp

    #include <iostream>
    #include <string>
    #include <fstream>
    #include <stdio.h>
    #include <cstdlib>
    #include "include/libhtml++.h"
    
    using namespace std;
    
    void htmlformselect::formselect(const std::string formselectname, std::string formselectinput, std::string methodform )
    {
    
    string formselectinputprint(formselectinput);
         int pos = 0;
         do
         {
              pos = formselectinputprint.find("[F]");
              if(pos != string::npos)
                    formselectinputprint.replace(pos,strlen("[F]"),"<option>");
         }
         while(pos != string::npos);
    
         do
         {
              pos = formselectinputprint.find("[/F]");
              if(pos != string::npos)
                    formselectinputprint.replace(pos,strlen("[/F]"),"</option>");
         }
         while(pos != string::npos);
    
    cout << "<select name=" << '"' << formselectname << '"' << formselectinputprint << "method=" << '"' << methodform << '"' << "action="
    << '"' << "http://tuxist.de/cgi-bin/index.cgi" << '"' << ">" << endl;
    }
    

    kompletter source code in ftp://tuxist.de/tuxist/tuxcms



  • Tuxist schrieb:

    Schreibe gerade an einem cms system:
    Habe nun folgendes problem.
    Index.cgi lässt nicht mehr kompilieren seit dem ich void formselect in eine klasse verfrachtet habe.

    Schön ... und wie sollen wir Dir helfen, wenn Du uns nicht verrätst, an welcher Zeile der Compiler welche Fehlermeldung ausspuckt. Hilfreich wäre auch die Angabe des verwendeten Compilers.

    und [C/C++]-Tags sind besser für C++-Code als [Code]-Tags.

    Gruß
    Werner


Anmelden zum Antworten