Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #4324
| From | Ian Collins <ian-news@hotmail.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: Problem with array objects |
| Date | 2011-04-25 10:12 +1200 |
| Message-ID | <91jlisF56lU1@mid.individual.net> (permalink) |
| References | (10 earlier) <%RKsp.40408$5t2.24872@newsfe06.ams2> <91hf57F6cmU6@mid.individual.net> <KVMsp.5319$Pi.32@newsfe22.ams2> <91hm6tF6cmU7@mid.individual.net> <2LUsp.37194$2W5.34221@newsfe16.ams2> |
On 04/25/11 12:31 AM, Paul wrote:
>
> "Ian Collins"<ian-news@hotmail.com> wrote
>>>>>>
>>>>>> Saying "*pparr=1; /*Cannot do this*/" is no different form writing
>>>>>>
>>>>>> struct X { int n; };
>>>>>>
>>>>>> X x;
>>>>>> X* px =&x;
>>>>>> *px = 1;
>>>>>>
>>>>> Saying "*pparr=1; /*Cannot do this*/". is completely different from
>>>>> writing
>>>>> the above code.
>>>>> pparr's type is not a pointer to an X. It's type is pointer to array of
>>>>> ints.
>>>>
>>>> Exactly.
>>>
>>> So *pparr=1; IS completely different from *px=1;
>>> Which you originally tried to present at being no different.
>>
>> No. I said "*px = 1;" is no different from "*pparr=1;". Both are errors.
>
> Altogether now! No you didn't say that.
You even quoted me saying it.
>>>> dereferencing pparr does not access the array , it..*drumroll*
>>>> dereferences
>>>> pparr.
>>
>>>> Neither does arr. Remember the origin claim you disputed?
>>>> "Dereferencing
>>>> pparr accesses an array in the same sense that using the name arr
>>>> accesses
>>>> an array".
>>>
>>> *arr =1;
>>
>>> Almost everything you say is completely incorrect,
>>
>> What exactly did I say that was in correct? I said you were wrong in
>> denying the quote above and you have consistently failed to address that.
>>
> When I said dereferencing pparr does not access the array , you said
> "neither does arr", which is obvioulsy wrong because dereferencing arr does
> access the array.
(*pparr) and arr have the same type. So whatever applies to one,
applies to the other.
> Do I really have to point out the meaning an of every single statement
> because you are too stupid to interpret anything correctly.
Ah, resorting to insults again, good job.
>> (*pparr)[0] = 42;
>>
> You Fail.
> This code dereferences pparr then uses the subscript operator,
Well that is how you access an array! How is it different from
arr[0] = 42?
I'll remind you again, the statement you disputed was:
"Dereferencing pparr accesses an array in the same sense that using the
name arr accesses an array".
Now given typeid(arr) == typeid(*pparr), how can that be false?
--
Ian Collins
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar
Re: Problem with array objects "A. Bolmarcich" <aggedor@earl-grey.cloud9.net> - 2011-04-18 12:44 -0500
Re: Problem with array objects "Paul" <pchristor@yahoo.co.uk> - 2011-04-18 21:35 +0100
Re: Problem with array objects "A. Bolmarcich" <aggedor@earl-grey.cloud9.net> - 2011-04-19 13:46 -0500
Re: Problem with array objects "Paul" <pchristor@yahoo.co.uk> - 2011-04-20 17:29 +0100
Re: Problem with array objects "A. Bolmarcich" <aggedor@earl-grey.cloud9.net> - 2011-04-23 12:59 -0500
Re: Problem with array objects "Paul" <pchristor@yahoo.co.uk> - 2011-04-23 20:31 +0100
Re: Problem with array objects Ian Collins <ian-news@hotmail.com> - 2011-04-24 09:26 +1200
Re: Problem with array objects "Paul" <pchristor@yahoo.co.uk> - 2011-04-24 00:04 +0100
Re: Problem with array objects Ian Collins <ian-news@hotmail.com> - 2011-04-24 11:24 +1200
Re: Problem with array objects "Paul" <pchristor@yahoo.co.uk> - 2011-04-24 02:16 +0100
Re: Problem with array objects Ian Collins <ian-news@hotmail.com> - 2011-04-24 14:10 +1200
Re: Problem with array objects "Paul" <pchristor@yahoo.co.uk> - 2011-04-24 04:37 +0100
Re: Problem with array objects Ian Collins <ian-news@hotmail.com> - 2011-04-24 16:11 +1200
Re: Problem with array objects "Paul" <pchristor@yahoo.co.uk> - 2011-04-24 13:31 +0100
Re: Problem with array objects Peter Remmers <p.remmers@expires-2011-04-30.arcornews.de> - 2011-04-24 17:57 +0200
Re: Problem with array objects "Paul" <pchristor@yahoo.co.uk> - 2011-04-24 17:39 +0100
Re: Problem with array objects Ian Collins <ian-news@hotmail.com> - 2011-04-25 10:19 +1200
Re: Problem with array objects Ian Collins <ian-news@hotmail.com> - 2011-04-25 10:12 +1200
Re: Problem with array objects "Paul" <pchristor@yahoo.co.uk> - 2011-04-25 00:46 +0100
Re: Problem with array objects Ian Collins <ian-news@hotmail.com> - 2011-04-25 11:59 +1200
Re: Problem with array objects "Alf P. Steinbach /Usenet" <alf.p.steinbach+usenet@gmail.com> - 2011-04-25 05:01 +0200
Re: Problem with array objects Ian Collins <ian-news@hotmail.com> - 2011-04-25 14:56 +1200
Re: Problem with array objects "Paul" <pchristor@yahoo.co.uk> - 2011-04-25 10:57 +0100
Re: Problem with array objects "A. Bolmarcich" <aggedor@earl-grey.cloud9.net> - 2011-04-26 12:36 -0500
Re: Problem with array objects "Paul" <pchristor@yahoo.co.uk> - 2011-04-26 22:42 +0100
Re: Problem with array objects "A. Bolmarcich" <aggedor@earl-grey.cloud9.net> - 2011-04-27 12:53 -0500
Re: Problem with array objects Leigh Johnston <leigh@i42.co.uk> - 2011-04-27 19:06 +0100
Re: Problem with array objects "Paul" <pchristor@yahoo.co.uk> - 2011-04-27 20:09 +0100
Re: Problem with array objects "A. Bolmarcich" <aggedor@earl-grey.cloud9.net> - 2011-04-29 12:57 -0500
Re: Problem with array objects Leigh Johnston <leigh@i42.co.uk> - 2011-04-29 19:10 +0100
Re: Problem with array objects "Paul" <pchristor@yahoo.co.uk> - 2011-04-29 19:56 +0100
Re: Problem with array objects "A. Bolmarcich" <aggedor@earl-grey.cloud9.net> - 2011-05-02 13:20 -0500
Re: Problem with array objects "Paul" <pchristor@yahoo.co.uk> - 2011-05-02 22:43 +0100
Re: Problem with array objects "A. Bolmarcich" <aggedor@earl-grey.cloud9.net> - 2011-05-05 14:13 -0500
Re: Problem with array objects "Paul" <pchristor@yahoo.co.uk> - 2011-05-05 22:21 +0100
Re: Problem with array objects Ian Collins <ian-news@hotmail.com> - 2011-05-06 10:49 +1200
Re: Problem with array objects "Paul" <pchristor@yahoo.co.uk> - 2011-05-06 12:29 +0100
Re: Problem with array objects "A. Bolmarcich" <aggedor@earl-grey.cloud9.net> - 2011-05-07 11:34 -0500
Re: Problem with array objects "Paul" <pchristor@yahoo.co.uk> - 2011-05-08 04:05 +0100
csiph-web