Hi,
I am a beginner in FLTK and cannot figure out what's wrong with the following
code. Segmentation fault occures at the consoleWindow->show() invocation.
Could you help me, please?
Thank you,
Miklos
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Box.H>
class UserInterface {
public:
UserInterface();
Fl_Double_Window *consoleWindow;
void show();
};
UserInterface::UserInterface() {
{ consoleWindow = new Fl_Double_Window(345, 175);
consoleWindow->user_data((void*)(this));
{ new Fl_Box(80, 35, 25, 25, "Hello");
} // Fl_Box* o
consoleWindow->end();
} // Fl_Double_Window* consoleWindow
}
void UserInterface::show() {
consoleWindow->show();
}
int main(int argc, char **argv) {
UserInterface* ui = new UserInterface();
ui->show();
return Fl::run();
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk