The o->copy code is looking for the zero-filled item as a terminator.
Thanks a lot, I have a bit of an issue though...
Here is my code (roughly, my memory isn't perfect):
Fl_Menu_Item menu_item[] = { {"name", 0, nullptr, int_ptr } }; // here int_ptr is a int* which exists for the entire duration of the program Fl_Menu_Button* o = new Fl_Menu_Button(400, 30, 40, 15);
o->copy(menu_item); // < here, it crashes and complains about menu_item.size()
Do you know what this might be caused by, and how it could be fixed?
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.