Re: g_list_append - cannot convert error
- From: Darin Adler <darin bentspoon com>
- To: Havoc Pennington <hp redhat com>, miette <linux_uber_alis yahoo com>
- Cc: <gtk-app-devel-list gnome org>
- Subject: Re: g_list_append - cannot convert error
- Date: Wed, 17 Oct 2001 13:00:42 -0700
on 10/17/01 12:53 PM, Havoc Pennington at hp redhat com wrote:
In C++ a cast is required here, something like:
g_list_append (glist, static_cast<void*>("String"))
In C you don't need that.
The issue is the const, not the void* vs. char*, and static_cast won't
remove const, so it needs to be:
g_list_append (glist, const_cast<char*>("String"));
The conversion from char* to void* is done automatically.
-- Darin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]