Re: get integer/real number from gtk_entry_set_text



On 13/05/2012 03:13, Rudra Banerjee wrote:
but it still fails with segmentation fault.

mini_ten.c:51:1: warning: passing argument 1 of âatoiâ from incompatible
pointer type [enabled by default]
/usr/include/stdlib.h:148:12: note: expected âconst char *â but argument
is of type âstruct GtkWidget *â

"expected âconst char *â but argument is of type âstruct GtkWidget * "

i=atoi (gtk_entry_get_text (GTK_ENTRY(entry)));

That may be better. :)




--
Axel FILMORE
#--------------------------------------------#
        https://github.com/afilmore
#--------------------------------------------#
 Vala - Compiler For The GObject Type System
        https://live.gnome.org/Vala
#--------------------------------------------#




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