|
|
Thank you for the comment. I agree the "theory mode" is better. In fact I tried to make the vector a static member of Fl_Gauge but again it did not work - size() returned zero in timer callback. In the end I took Ian's suggestion: made a huge static array inside Fl_Gauge class, and a static int to count the number elements.
For the vector, I tried
1. extern variable 2. typedef first, then extern 3. class member of Gauges window (which contains all the Fl_Gauge objects) 4. static member of Fl_Gauge
Only 3. worked, as if the vector doesn't like to be a global variable. However I tried a small test program that uses a few lines of code to test a vector of int type as extern variable. That worked fine. I surrender.
--
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.
For more options, visit https://groups.google.com/groups/opt_out.
[ Direct Link to Message ] | |
|
| |