Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ian Collins Newsgroups: comp.lang.c++ Subject: Re: Problem with array objects Date: Sat, 16 Apr 2011 08:02:42 +1200 Lines: 24 Message-ID: <90rmj2FojcU2@mid.individual.net> References: <36fce640-87bf-4e9d-9349-2236850f7666@r19g2000prm.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net UTzyt7hUBP3QUXyZ/uAeJQkjQrBzPKOnIygYPHhwS+0uC18/wJ Cancel-Lock: sha1:nq5iHXHNtKMRC24TLbIGwfohYsA= User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.2.9) Gecko/20101021 Lightning/1.0b2 Thunderbird/3.1.4 In-Reply-To: <36fce640-87bf-4e9d-9349-2236850f7666@r19g2000prm.googlegroups.com> Xref: x330-a1.tempe.blueboxinc.net comp.lang.c++:3789 On 04/16/11 06:07 AM, gwowen wrote: > On Apr 15, 6:25 pm, "A. Bolmarcich" > wrote: >> >>> p is a pointer to an array of 4 ints, not only to one single int. >> >> No, p is a pointer to an int. If it were a pointer to an array of >> 4 ints, then the byte address that the result of the expression >> >> p+1 >> >> points to would be the byte address that p points plus >> 4*sizeof(int). However, the byte address of what that expression >> points to is the byte address that p points to plus sizeof(int). > > Hey. There's a novel point. No-one has ever made that observation to > Paul before. That'll probably convince him. > At last, our long national nightmare is over. Do you really expect someone who don't know whether the C++ language has one or more standards to grasp such a clear and simple bit of logic? -- Ian Collins