format number on gtklabel



How I want to send string with number like 3456789 to GtkLabel with the output 3.456.789,00
I try this code :

str_total = g_strdup_printf("%f", dbl_total);
str_total_formatted = g_strndup(str_total, strcspn(str_total, ".") +3);

and the output : 3456789.00

How to make the output : 3.456.789,00

thx



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