From owner-freebsd-questions@FreeBSD.ORG Sat Feb 19 09:57:55 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4D42116A4CE for ; Sat, 19 Feb 2005 09:57:55 +0000 (GMT) Received: from hobbiton.shire.net (hobbiton.shire.net [166.70.252.250]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B39C43D1D for ; Sat, 19 Feb 2005 09:57:55 +0000 (GMT) (envelope-from chad@shire.net) Received: from [67.161.222.227] (helo=[192.168.99.68]) by hobbiton.shire.net with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.43) id 1D2RN4-000385-I3; Sat, 19 Feb 2005 02:57:54 -0700 In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v619.2) Message-Id: <5b8472dd5925a0b0b59f15cd9f8e15f3@shire.net> From: Chad Leigh -- Shire.Net LLC Date: Sat, 19 Feb 2005 02:57:53 -0700 To: Gert Cuykens X-Mailer: Apple Mail (2.619.2) X-SA-Exim-Connect-IP: 67.161.222.227 X-SA-Exim-Mail-From: chad@shire.net Content-Type: text/plain; charset=EUC-KR; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on hobbiton.shire.net X-Spam-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_50 autolearn=disabled version=3.0.0 X-Spam-Level: X-SA-Exim-Version: 4.1+cvs (built Mon, 23 Aug 2004 08:44:05 -0700) X-SA-Exim-Scanned: Yes (on hobbiton.shire.net) cc: freebsd-questions@freebsd.org Subject: Re: c++ X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Feb 2005 09:57:55 -0000 On Feb 19, 2005, at 2:51 AM, Gert Cuykens wrote: > On Thu, 17 Feb 2005 13:17:51 +0100, Hubert Soko=A9=A9owski > wrote: >> On Thu, 17 Feb 2005 13:05:43 +0100 >> Gert Cuykens wrote: >> >>> static void callback( GtkWidget *widget, gpointer data ){ >>> g_print ("Hello again - %s was pressed\n", (gchar *) data); >>> } >>> >>> why do they put () around gchar ? >>> why can it not be gchar *data ? >> >> You should learn some more about programming in C before you start >> writing GTK apps. >> >> hs > > Does anybody want to explain what the () thingies are around gchar * ? > It is a typecast -- coercing "data" to be of type (gchar *) to the=20 compiler when matching parameter types at compiler time. Chad