Re: g_list_append - cannot convert error
- From: Havoc Pennington <hp redhat com>
- To: miette <linux_uber_alis yahoo com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: g_list_append - cannot convert error
- Date: 17 Oct 2001 15:53:13 -0400
miette <linux_uber_alis yahoo com> writes:
I'm trying to create a GList, so I can add items to a
combo box. I use the following code:
GList *glist = NULL;
glist = g_list_append (glist, "String");
and I get this error:
cannot convert `const char *' to `void *' for
argument `2' to `f_list_append (GList *, void *)'
Am I missing something? Using GTK 1.2.10.
In C++ a cast is required here, something like:
g_list_append (glist, static_cast<void*>("String"))
In C you don't need that.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]