🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.tools.mfc
Article #19

Re: Newbie pointer question

#19
From: Glenn Sills
Date: Fri, 22 Sep 1995 13:29
48 lines
1582 bytes
In article <43nqb8$c2i@cnn.Princeton.EDU>, tim@franck.Princeton.EDUÌ says...
>
>In article <Pine.SUN.3.91.950919124849.1948C-100000@achilles>,
>Brandon Wallace  <brandon@criterion.com> wrote:
>>On Sun, 10 Sep 1995, Vashist Worah wrote:
>>

SNIP...

>>-> 
>>-> 1)  double*  x
>>-> 2)  double  *x
>>-> 
>>
>>THERE IS NO FUNCTIONAL DIFFERENCE
>>
>>However, some people prefer (1) over (2), some (2) over (1), some don't care.
>
>Answer 1: Brandon is absolutely right.
>
>Answer 2: You should use 2) because if you use the first, you will
>probably think that '*' is part of the type, and do something like:
>
>double* x, y; // declares a pointer to double and a plain old double
>

Actually I prefer:

	double* x;
	double y;
	...

because the * IS part of the type....  But it's obviously just a superficial
style thang:-)











>at least with the * next to the x, it's a bit more obvious that the *
>only applies to the x.
>
Technical Details
Message-ID: <43udn6$4kt@zephyr.ens.tek.com>
Path: arc1-ca.pugleaf.net!news.tek.com!usenet
References: <9a7cb$d1625.8d@news.tcsmgmt.com> <Pine.SUN.3.91.950919124849.1948C-100000@achilles> <43nqb8$c2i@cnn.Princeton.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.tek.com!usenet
From: sills@sills.mv.com (Glenn Sills)
Newsgroups: comp.os.ms-windows.programmer.tools.mfc,comp.os.ms-windows.programmer.win32,comp.lang.c,comp.lang.c++
Subject: Re: Newbie pointer question
Date: 22 Sep 1995 13:29:10 GMT
Organization: Tektronix, Inc, Beaverton, OR, USA
Message-ID: <43udn6$4kt@zephyr.ens.tek.com>
References: <9a7cb$d1625.8d@news.tcsmgmt.com> <Pine.SUN.3.91.950919124849.1948C-100000@achilles> <43nqb8$c2i@cnn.Princeton.EDU>
NNTP-Posting-Host: 192.158.164.30
Mime-Version: 1.0
Content-Type: Text/Plain; charset=ISO-8859-1
X-Newsreader: WinVN 0.99.6