|
|
That solved the issue, thank you so much!On Saturday, June 19, 2021 at 11:18:58 PM UTC-7 er...@seriss.com wrote:
Fl_Check_Button*
o = new Fl_Check_Button(470, 60 + 15 * numbuttons, 1000,
15, name.c_str());
Here Fl_Check_Button's constructor
is saving the pointer to name.c_str()
and is not making a copy of the string. So the
string has gone out of scope by the
time the strings are being drawn.
Instead use:
Fl_Check_Button*
o = new Fl_Check_Button(470, 60 + 15 * numbuttons, 1000,
15);
o->copy_label(name.c_str());
..so that the widget internally makes a copy of the string.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/481e2285-039d-4431-a9a0-5ced73da8510n%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |