Hello,

I have run into a little problem setting labels. There is probably 
something extremely trivial I am overlooking, but can't seem to figure 
it out.

If I try to set a label like so, the label contents look garbled:

// i is an integer from 1 to 24
char labeltext[3];
snprintf(&labeltext[0],3,"%d",i); 
this->tracknum->label(labeltext);

However, printing the contents of labeltext with
cout << labeltext << endl; shows the correct content.

However, this->tracknum->label("1"); works flawlessly.

I have also tried %d followed by \0.
As i is an integer from 1..24, for now I have solved things with a huge 
fat ugly switch statement, which does the trick, but, well, is ugly as 
hell.

Any idea what I may be overlooking?

Best,
Marc

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to