[Glade-users] How To Send Array Element To Label?



I have an array:
 
char array1[] = "abcdefg";
 
and would like to send "array1[3]" as the text in a label. I thought I could do this:
 
GtkWidget *label = lookup_widget(GTK_WIDGET(button), "label1");
gtk_label_set_text(GTK_LABEL(label),array1[3]);
 
but it doesn't work... I get a compiler error saying, "passing argument 2 of 'gtk_label_set_text' makes 
pointer from integer without a cast".
 
Does anyone have a suggestion on how I can set an array element as the text of a label? Thanks.

                
---------------------------------
 Yahoo! FareChase - Search multiple travel sites in one click.  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20051109/3034282b/attachment.html



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