Re: fgets -> CList
- From: CALMELS Clement <calmels_clement stna dgac fr>
- To: Thomas Bliesener <bli cybercable net mx>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: fgets -> CList
- Date: Fri, 27 Apr 2001 10:17:37 +0200
Hi,
The reason why your code doesn't work is simple. The second argument of
gtk_clist_append is not a char* but a char** (actually a char* []). Take
a look at:
http://developer.gnome.org/doc/API/gtk/gtkclist.html
http://www.gtk.org/tutorial/sec-aclistexample.html
In your code just try:
gtk_clist_append (GTK_CLIST (clist), &buffer);
It will work if your clist has only one column.
Clement.
Thomas Bliesener wrote:
I want to read the rows for a clist widget from a file:
char buffer[100];
[...]
fgets (buffer, sizeof (buffer), fz);
gtk_clist_append (GTK_CLIST (clist), buffer);
but this obviously doesn't work:
create_clist.c:83: warning: passing arg 2 of `gtk_clist_append' from
incompatible pointer type
How can I prepare the data from fgets for gtk_clist_append?
--
* Debian = GNU/Linux XP *
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]