Re: GList
- From: Vivien Malerba <vmalerba gmail com>
- To: denis chuvashia ru
- Cc: GTK-app-devel <gtk-app-devel-list gnome org>
- Subject: Re: GList
- Date: Tue, 3 May 2005 15:32:03 +0200
On 5/2/05, Городничев Денис <denis chuvashia ru> wrote:
i think that the result of next code must be 3.
but i have 0
if uncomment "l=..." it's work correctly
#include <glib.h>
int main()
{
GList* l=NULL;
// l=g_list_alloc();
g_list_append(l,GINT_TO_POINTER(1));
g_list_append(l,GINT_TO_POINTER(1));
g_list_append(l,GINT_TO_POINTER(1));
printf("%i",g_list_length(l));
}
use:
l = g_list_append(l,GINT_TO_POINTER(1));
instead of:
g_list_append(l,GINT_TO_POINTER(1));
Vivien
- References:
- GList
- From: =?koi8-r?Q?=E7=CF=D2=CF=C4=CE=C9=DE=C5=D7_?= =?koi8-r?Q?=E4=C5=CE=C9=D3?=
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]