want to add number to label



Hello, I think I have a simple problem but I cannot figure out how to
get a float on a label. It is designed for a string, like "this is a
button" but I want to show a float value. 

So my question is how can I turn a float into a suitable format to stick
to a label?

Example that does not work:

GtkWidget *button;
float nr;

nr = 3.123;
button = gtk_label_new ((char *) nr);  ????

Thank you, Edward



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]