Work with classesin C++



Hi.

I have a problem with classes in C++
I'm reading a tutorial (http://www.cplusplus.com/doc/tutorial/) but I
can find the error

First, sorry it's hard to a Spanish VB programmer to explain a C++
problem in English

Hi have a MainWindow class

class MainWindow : public Gtk::Window
{
	public:
		MainWindow(BaseObjectType* cobj, Glib::RefPtr<Gnome::Glade::Xml>& pGlade);

pGlade is loaded in mpGlade and I use it to work....

Now I want create a OptionsPane class that contain all the code of one
GTK::NoteBook panel

I', trying with this.....
class OptionsPane
{
	public:
		OptionsPane(Glib::RefPtr<Gnome::Glade::Xml>& pGlade);

....
    //GTK::NoteBook with all panels
    mpGlade->get_widget("MainNoteBook", mpMainNoteBook);
    //Init Options panel
    OptionsPane* mpOptionsPane(mpGlade);

But compiler fails
cannot convert `Glib::RefPtr<Gnome::Glade::Xml>' to `OptionsPane*' in
initialization.

Maybe my approach to this problem is wrong (I'm a beginner)
¿I need a Gnome::Glade::Xml is this class (to use mpGlade)?


Un saludo
Carlos Garcés



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]