Re: [gtk-list] Re: Converting pointers



Your suggested changes removed the warning I was getting but now this line:

  text[0] = group->name;

produces this warning:

  warning: assignment discards `const' from pointer target type    



On Fri, 31 Dec 1999, Havoc Pennington wrote:
> Anthony Tekatch <tekatch@idirect.com> writes:
> > I'm not sure how to convert an xmlNodePtr to the gchar pointer
> > required by arg 4 of gtk_ctree_insert_node.
> 
> It's a character array not a gchar pointer. Try this:
> gchar* text[2];
> text[0] = group->name;
> text[1] = NULL; /* not required, just anal */
> 
> pass "text" as that argument. Note: "text" must have an element for
> each column in the CTree.
> 
> >  warning: passing arg 4 of `gtk_ctree_insert_node' from incompatible
> >  pointer type
> >
> 
> Type error. Solution is: write down the type you have. Write down the
> expected type. Consider how to convert and if conversion is possible.
> 
> Havoc



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]