Re: (no subject)
- From: Vlad Harchev <hvv hippo ru>
- To: "Cesar Suarez C." <c-suarez uniandes edu co>
- Cc: gtk-list gnome org
- Subject: Re: (no subject)
- Date: Sat, 3 Jun 2000 13:53:23 +0500 (SAMST)
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]