|
|
On Thu, 6 Oct 2022, 22:29 roger wrote:
Thx for the replies everybody. No sure I really "get it" but at least I know how to make it work. (s2 existed so I could look at the values in GDB)
Having said that, how should I code this so iy happens in one step?
string s1 = to_string(z); win2_unitprice->value(s1.c_str());
There are possibly as many answers to that as there are programmers... Opinions will vary!
FWIW I'd be using C-strings & snprintf() probably. That's not the answer you need or want.
The easiest way might be to use an Fl_Value_Input widget instead, since that will accept your double z directly without conversions at all. -- Ian From my Fairphone FP3
--
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/CAGFM6daFykW9QiOrn53QxoMS44JcjCdgXjUOBXVO_J%3DbgeU8Hw%40mail.gmail.com.
[ Direct Link to Message ] | |
|
| |