From owner-freebsd-questions@FreeBSD.ORG Sun Feb 20 15:15:56 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 2FC8316A4CE for ; Sun, 20 Feb 2005 15:15:56 +0000 (GMT) Received: from mail.terralink.de (mail.tlink.de [217.9.16.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 774B943D46 for ; Sun, 20 Feb 2005 15:15:55 +0000 (GMT) (envelope-from me@daniel.stefan.haischt.name) Received: from smtp.abyssworld.de (daniel-s-haischt.biz [84.252.66.2]) by mail.terralink.de (Postfix) with ESMTP id 1AA45B869; Sun, 20 Feb 2005 16:15:54 +0100 (CET) Received-SPF: none (smtp.abyssworld.de: 192.168.1.6 is neither permitted nor denied by domain of daniel.stefan.haischt.name) client-ip=192.168.1.6; envelope-from=me@daniel.stefan.haischt.name; helo=[192.168.120.239]; Received: from [192.168.120.239] (smtp.abyssworld.de [192.168.1.6]) by smtp.abyssworld.de (Postfix) with ESMTP id 578BB17010; Sun, 20 Feb 2005 16:15:47 +0100 (CET) Message-ID: <4218A99F.4080204@daniel.stefan.haischt.name> Date: Sun, 20 Feb 2005 16:15:43 +0100 From: "Daniel S. Haischt" User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: Gert Cuykens References: <5b8472dd5925a0b0b59f15cd9f8e15f3@shire.net> <675354920.20050220001731@wanadoo.fr> <20050220124749.GA523@tuatara.fishballoon.org> In-Reply-To: <20050220124749.GA523@tuatara.fishballoon.org> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Processed-By: GNU Anubis v4.0 X-Purified-With: DSPAM, Clam AntiVirus cc: freebsd-questions@freebsd.org Subject: Re: c++ X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: me@daniel.stefan.haischt.name List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Feb 2005 15:15:56 -0000 Gert Cuykens, I would suggest to post such questions to gtk-list@gnome.org, because IIRC you are trying to code a GTK app ... Additionally I would suggest to learn C/C++ first to get a better understanding of the whole language structure. Or at least please join the c# IRC channel at irc.freenode.net to ask such questions, it's quite annoying to see them on a list which is dedicated to an UNIX OS. Scott Mitchell schrieb: > On Sun, Feb 20, 2005 at 08:41:30AM +0100, Gert Cuykens wrote: > >>So if data is declared as a gchar *data; for example, then the value >>of data is a memory adress right ? So if A=data; and B=&data; then A >>and B are exactly the same result right ? > > > No. A is a 'pointer to gchar' (or gchar*) and B is a 'pointer to pointer > to gchar' (or gchar**). The '&data' syntax means 'the address of the data > variable', ie. the address of a gchar*, whereas data itself contains the > address of a gchar. > > >>Now why would anybody want a gchar when a integer is needed ? That is >>just making it more complicated then it already is? > > > Because the code in question deals with gchars (whatever they are) not > integers? They won't necessarily be the same thing on different > architectures, or even different compilers on the same architecture. Also, > the type is called 'gchar' presumably because it logically holds some kind > of character data, whereas an integer variable holds an integer. Calling > them different things in the code helps to make it clear what the > programmer's intention is, even if the two types happen to have the same > representation on a given machine/compiler. > > In any case, this stuff really has nothing to do with FreeBSD - you should > be asking these questions in a C/C++ programming group. > > Cheers, > > Scott > -- Mit freundlichen Gruessen / With kind regards DAn.I.El S. Haischt Want a complete signature??? Type at a shell prompt: $ > finger -l haischt@daniel.stefan.haischt.name