-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I normally have no problem with c++ programming and am really ashamed to post it here, but I just can't find the bug and spent the whole day finding it and I'm really fed up. This is the error messages I get:
../src/Gui.cpp: In member function 'Text* Gui::createText(std::string, std::string, int, int, int, int, std::string, std::string)': ../src/Gui.cpp:65: error: no matching function for call to 'std::list<Text, std::allocator<Text> >::push_back(Text (&)(std::string, std::string, int, int, int, int, std::string, std::string))' /usr/lib/gcc/i686-pc-linux-gnu/4.3.2/include/g++-v4/bits/stl_list.h:875: note: candidates are: void std::list<_Tp, _Alloc>::push_back(const _Tp&) [with _Tp = Text, _Alloc = std::allocator<Text>] You can either get the sourcecode from: http://cvs.savannah.gnu.org/viewvc/ksseq2008/ksinternalgui/?root=ksseq Or use this: /*************************************************************************** * Gui.h * * Nov 10, 2008 6:11:08 PM CET 2008 * Copyright 2008 Christian Loehnert * [EMAIL PROTECTED] ****************************************************************************/ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GUI_H_ #define GUI_H_ #include <lo/lo.h> #include <string> #include <list> #include "Box.h" #include "Menu.h" #include "Control.h" #include "Text.h" #include "Button.h" using namespace std; class Gui { public: lo_address address; string sIp; string sPort; string sTextInputElement; string sTitle;//replaces applicationtab string sFocusBoxId; void init( list<Gui> *_guis ); /** * creates a new box and adds it to the list boxes * @param _name the name of the box * @param _superBox the box it corresponds to, empty if there's none * @param _x the x position * @param _y the y position * @param _w the width * @param _h the height * @param _shortCut its shortcut */ Box* createBox( string _name, string _superBox, int _x, int _y, int _w, int _h, string _shortCut ); /** * creates a new button and adds it to the list buttons. * @param _box the name of the box, the box must exist!!! theres no check * @param _caption the caption of the button */ Button* createButton( string _name, string _box, int _x, int _y, int _w, int _h, string _shortCut, string _caption ); /** * creates a new menu and adds it to the list menus * @param _caption the caption of the first menuitem * @param _value the value of the first menuitem */ Menu* createMenu( string _name, string _box, int _x, int _y, int _w, int _h, string _caption, int _value ); /** * creates a new control and adds it to the list controls * @param _min the minimum value of this controller * @param _max the maximum value of this controller * @param _increment the amount of steps which shall be incremented * @param _value the initialization value */ Control* createControl( string _name, string _box, int _x, int _y, int _min, int _max, int _increment, int _value ); /** * creates a text and adds it to the list texts */ Text* createText( string _name, string _box, int _x, int _y, int _w, int _h, string _shortCut, string _caption ); /** * Returns a pointer to this box. * @param _name the name of the box * @param _superBox its super box if exists * @return a pointer to the box */ list<Box>::iterator getBox( string _name, string _superBox ); /** * Returns a pointer to this button. * @param _name the name of this button * @param _box the box this button corresponds to * @return a pointer to the button */ list<Button>::iterator getButton( string _name, string _box ); /** * same as getButton */ list<Menu>::iterator getMenu( string _name, string _box ); /** * same as getButton */ list<Control>::iterator getControl( string _name, string _box ); /** * same as getButton */ list<Text>::iterator getText( string _name, string _box ); /** * Removes the give box * @param _name its name * @param _superBox its super box */ void removeBox( string _name, string _superBox ); /** * removes a button * @param _name * @param _box */ void removeButton( string _name, string _box ); /** * removes a menu * @param _name * @param _box */ void removeMenu( string _name, string _box ); /** * removes a control * @param _name * @param _box */ void removeControl( string _name, string _box ); /** * removes a text * @param _name * @param _box */ void removeText( string _name, string _box ); private: list<Gui> *guis; list<Button> buttons; list<Control> controls; list<Menu> menus; list<Box> boxes; list<Text> texts; }; #endif /* GUI_H_ */ /*************************************************************************** * Gui.cpp * * Nov 13, 2008 10:09:18 PM CET 2008 * Copyright 2008 Christian Loehnert * [EMAIL PROTECTED] ****************************************************************************/ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "../incl/Gui.h" Text* Gui::createText( string _name, string _box, int _x, int _y, int _w, int _h, string _shortCut, string _caption ) { Text text( string _name, string _box, int _x, int _y, int _w, int _h, string _shortCut, string _caption ); texts.push_back( text ); return &texts.back(); } Control* Gui::createControl( string _name, string _box, int _x, int _y, int _min, int _max, int _increment, int _value ) { Control control( _name, _box, _x, _y, _min, _max, _increment, _value ); controls.push_back( control ); return &controls.back(); } I don't get it, please help me! Christian -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkomDYACgkQVC26eJ+o0+1FpACfaJFZuL1fP8HpfoWoX25SsbM2 yBoAn1Xif9SYLW/jpElBYYXHVInI88qv =HtHw -----END PGP SIGNATURE----- _______________________________________________ Linux-audio-dev mailing list [email protected] http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
