On 03/13/13 03:24, Edzard Egberts wrote: >> #include<FL/Fl.H> >> #include<FL/Fl_Window.H> >> #include<FL/Fl_Input.H> >> #include<FL/Fl_Output.H> >> >> int main() { >> Fl_Window win(400, 600, "TestWindow"); >> win.begin(); >> Fl_Output test(50, 50, 300, 500, "Test"); > > This is wrong, you must create widgets dynamically when inserting them > to a window.
Not wrong AFAIK, just not commonly used outside of small examples. It's fine for when instances of widgets are being created inside main(), which won't go out of scope unless the program ends. But it's true, in the typical case where widgets are often created outside of main(), you must use 'new'. _______________________________________________ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk