On Sat, 3 Jun 2000, Cesar Suarez C. wrote:
Hi
>
>
>
> Hi,! well, Im a newbie and I thought that maybe someone out there would
> like to help me out.
>
> this is my problem.
> Im using a GList that has it "data(void *) pointing to some Note objects
> that I created.
> I use the func g_list_nth_data that returns a gpointer. to those objects
>
> I declared a pointer to the Note objects pNote.
> I try to do something like this:
> pNote temp;
> temp=(pNote)g_malloc(sizeof (struct Note));
> temp=g_list_nth_data(noteList, position); ->error line
Just use
temp=(pNote)g_list_nth_data(noteList, position);
since g_list_nth_data returns (void*) and you assign the return value to the
variable of type Pnote.
> (noteList's a GList *).
>
> when compiling I get this error message: (compiling with g++ since gotta
> compile the classes, etc).
> ANSI C++ forbids implicit conversion from `void *' in assignm
> ent .
> Error 1.
>
>
> dose ANYBODY knows a way to avoid this error...and WOULD like to help me
> ..plz! as I said Im a newbie..and I hope my question doesnt disturbs
> anybody.
>
> Cesar
>
Best regards,
-Vlad
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list