diff options
| author | Greg Ercolano <erco@seriss.com> | 2020-07-21 20:15:41 -0700 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2020-08-01 14:19:40 -0700 |
| commit | 2141c63628a831d3f53dad7035c94028f8d0d629 (patch) | |
| tree | 614cb7b627da2decbb7cfe49c081f9d7b4140c58 /examples/table-as-container.cxx | |
| parent | 7514a73ba759f7fc9965eeef3b92ece899bd7a69 (diff) | |
Implement + deploy fl_strdup()
Diffstat (limited to 'examples/table-as-container.cxx')
| -rw-r--r-- | examples/table-as-container.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/table-as-container.cxx b/examples/table-as-container.cxx index 515ad884f..838c55512 100644 --- a/examples/table-as-container.cxx +++ b/examples/table-as-container.cxx @@ -31,6 +31,7 @@ #include <FL/Fl_Input.H> #include <FL/fl_draw.H> #include <FL/Fl_Table.H> +#include <FL/fl_string.h> // fl_strdup() void button_cb(Fl_Widget *w, void*); @@ -75,7 +76,7 @@ public: } else { // Create the light buttons sprintf(s, "%d/%d ", r, c); - Fl_Light_Button *butt = new Fl_Light_Button(X,Y,W,H,strdup(s)); + Fl_Light_Button *butt = new Fl_Light_Button(X,Y,W,H,fl_strdup(s)); butt->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE); butt->callback(button_cb, (void*)0); butt->value( ((r+c*2) & 4 ) ? 1 : 0); |
