Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   You snipped something. (http://www.velocityreviews.com/forums/t745554-you-snipped-something.html)

 Paul 03-22-2011 09:13 PM

You snipped something.

You snipped something Leigh , please don't ignore this:

Odd multiples of > denotes Leigh *******s..

>>>>> You fail yet again. I never said "pa" was not a pointer to an array;
>>>>> of course it is a pointer to an array; it is a pointer to a 1d array
>>>>> of type int[42].
>>>>>
>>>> It's a pointer to a 2d array
>>>> According to you any dynamic array is, not unlike you, 1 dimension
>>>> short
>>>> of a picnic.
>>>
>>> int (*pa)[42] = new int[42][42];
>>>
>>> "pa" is a pointer to a 1D array of type int[42]; this is an
>>> indisputable fact. The fact that what it points to is the initial
>>> element of a 2D array of type int[42][42] is irrelevant.
>>>

>> It's a pointer to....*drumroll* ..... what it points-to .
>> You are a confused idiot. Read the standards.

>
>

The standard states : "If the * operator, either explicitly or implicitly as
a result of subscripting, is applied to this pointer, the result is the
pointedto (n - 1 )dimensional array"
.............
(*pa) produces the **pointedto** (n-1) dimensional array. That is.... if pa
is the **pointedto** 2dim array(which it is) then derefenrencing it should
result in a 1dim array.

std::cout<< typeid(*pa).name(); /*int [42]*/

e voila!
Proven wrong once again.

>>
>>>>
>>>>
>>>> READ THE C++ STANDARDS.
>>>> "A consistent rule is followed for multidimensional arrays. If E is an
>>>> ndimensional
>>>> array of rank
>>>> i´ j´ . . . ´k, then E appearing in an expression is converted to a
>>>> pointer to an (n - 1 )dimensional
>>>> array
>>>> with rank j´ . . . ´k. If the * operator, either explicitly or
>>>> implicitly as a result of subscripting, is applied to
>>>> this pointer, the result is the pointedto
>>>> (n - 1 )dimensional
>>>> array, which itself is immediately converted
>>>> into a pointer."
>>>
>>> Irrelevant; what is relevant is the type of an object.
>>>

>> I rest my case.

Lets see how he tries to wangle out of this one :)

 Paul 03-22-2011 09:28 PM

Re: You snipped something.

"Leigh Johnston" <leigh@i42.co.uk> wrote in message
news:AKqdnU7JZopMjxTQnZ2dnUVZ8midnZ2d@giganews.com ...
> On 22/03/2011 21:13, Paul wrote:
>> You snipped something Leigh , please don't ignore this:
>>
>> Odd multiples of > denotes Leigh *******s..
>>
>>>>>>> You fail yet again. I never said "pa" was not a pointer to an array;
>>>>>>> of course it is a pointer to an array; it is a pointer to a 1d array
>>>>>>> of type int[42].
>>>>>>>
>>>>>> It's a pointer to a 2d array
>>>>>> According to you any dynamic array is, not unlike you, 1 dimension
>>>>>> short
>>>>>> of a picnic.
>>>>>
>>>>> int (*pa)[42] = new int[42][42];
>>>>>
>>>>> "pa" is a pointer to a 1D array of type int[42]; this is an
>>>>> indisputable fact. The fact that what it points to is the initial
>>>>> element of a 2D array of type int[42][42] is irrelevant.
>>>>>
>>>> It's a pointer to....*drumroll* ..... what it points-to .
>>>> You are a confused idiot. Read the standards.
>>>
>>>

>> The standard states : "If the * operator, either explicitly or
>> implicitly as
>> a result of subscripting, is applied to this pointer, the result is the
>> pointedto (n - 1 )dimensional array"
>> ............
>> (*pa) produces the **pointedto** (n-1) dimensional array. That is.... if
>> pa
>> is the **pointedto** 2dim array(which it is) then derefenrencing it
>> should
>> result in a 1dim array.
>>
>> std::cout<< typeid(*pa).name(); /*int [42]*/
>>
>> e voila!
>> Proven wrong once again.
>> READ THE STANDARDS.
>>
>>>>
>>>>>>
>>>>>>
>>>>>> READ THE C++ STANDARDS.
>>>>>> "A consistent rule is followed for multidimensional arrays. If E is
>>>>>> an
>>>>>> ndimensional
>>>>>> array of rank
>>>>>> i´ j´ . . . ´k, then E appearing in an expression is converted to a
>>>>>> pointer to an (n - 1 )dimensional
>>>>>> array
>>>>>> with rank j´ . . . ´k. If the * operator, either explicitly or
>>>>>> implicitly as a result of subscripting, is applied to
>>>>>> this pointer, the result is the pointedto
>>>>>> (n - 1 )dimensional
>>>>>> array, which itself is immediately converted
>>>>>> into a pointer."
>>>>>
>>>>> Irrelevant; what is relevant is the type of an object.
>>>>>
>>>> I rest my case.

>>
>>
>> Lets see how he tries to wangle out of this one :)
>>

>
> The inane ramblings of a demented freak.
>

So it's safe to assert you have created your own version f the C++ language.
And you refuse to accept the real C++ language, even when it's presented to
you in plain black'n'white.

GL troll , noob and idiot. :-)

 Noah Roberts 03-22-2011 09:33 PM

Re: You snipped something.

On 3/22/2011 2:21 PM, Leigh Johnston wrote:
[huge, full quotation of pointless thread of bullshit]
>>

>
> The inane ramblings of a demented freak.
>
> /Leigh

*plonk*
--
http://crazycpp.wordpress.com

 Paul 03-23-2011 02:31 AM

Re: You snipped something.

"Noah Roberts" <dont@email.me> wrote in message
news:4d89158d\$0\$17190\$cc2e38e6@news.uslec.net...
> On 3/22/2011 2:21 PM, Leigh Johnston wrote:
> [huge, full quotation of pointless thread of bullshit]
>>>

>>
>> The inane ramblings of a demented freak.
>>
>> /Leigh

>
> *plonk*
> --
> http://crazycpp.wordpress.com
>

You may think its a pile of pointless bullshit but its amazing just how many
people are confused by this, I believe you were/are one of them.

I understand why you are confused, because it seem logical that a pointer to
a type points to an object of that type. But it doesnt work this way with
arrays and once you understand why its pretty clear and obvious.
A pointer of type int* points to an int.
A pointer of type float* points a float
etc etc
And its simple to understand that when these pointers are derefernced they
return an int or a float value from the memory.

But with arrays you cannot have a pointer to an array of floats all at once,
so some choices are:
a) Have a pointer of the same type as the element. When dereferenced it
returns an object of element type. (seems perfect)
b) Have a pointer of type... int (*)[Size] (for example type). When
dereference is returns an array of same dimension. (not good but is perfect
for an array of Size+1 dimension)

And so it was the C++ pointer to array system was implemented. And the C++
standards were written.
If you think its bullshit then complain tot he authoroties. I think its
pretty simple, flexible and very easy to use. I'm happy with it :-)

GL

 James 03-23-2011 06:17 AM

Re: You snipped something.

"Leigh Johnston" <leigh@i42.co.uk> wrote in message
news:nKudnYNstrH3ixTQnZ2dnUVZ8gKdnZ2d@giganews.com ...
> On 22/03/2011 21:28, Paul wrote:

[...]

> I hope you were lying about your age because a 57 year old behaving like
> you do is only explainable if you have just woken up from a 40 year coma.
>
> Take your pills.

LOL! :^D

 Peter Remmers 03-23-2011 08:26 AM

Re: You snipped something.

Am 23.03.2011 03:31, schrieb Paul:
>
> "Noah Roberts"<dont@email.me> wrote in message
> news:4d89158d\$0\$17190\$cc2e38e6@news.uslec.net...
>> On 3/22/2011 2:21 PM, Leigh Johnston wrote:
>> [huge, full quotation of pointless thread of bullshit]
>>>>
>>>
>>> The inane ramblings of a demented freak.
>>>
>>> /Leigh

>>
>> *plonk*
>> --
>> http://crazycpp.wordpress.com
>>

> You may think its a pile of pointless bullshit but its amazing just how many
> people are confused by this, I believe you were/are one of them.
>
> I understand why you are confused, because it seem logical that a pointer to
> a type points to an object of that type. But it doesnt work this way with
> arrays and once you understand why its pretty clear and obvious.

You only see it from an observer's viewpoint. You experimented, saw how
things seemed to work, and so to you that's how it must be. You never
learned the technical details behind that behaviour. All your arguments
make it pretty obvious, including that member function thing. Sure, on
the surface they seem to be part of objects, they behave like they are
part of objects, but when you poke in the right spots, you'll notice
that under the hood they really aren't.

> A pointer of type int* points to an int.
> A pointer of type float* points a float
> etc etc
> And its simple to understand that when these pointers are derefernced they
> return an int or a float value from the memory.
>
> But with arrays you cannot have a pointer to an array of floats all at once,
> so some choices are:
> a) Have a pointer of the same type as the element. When dereferenced it
> returns an object of element type. (seems perfect)
> b) Have a pointer of type... int (*)[Size] (for example type). When
> dereference is returns an array of same dimension. (not good but is perfect
> for an array of Size+1 dimension)

The type says that it points "to an array of floats all at once" like
you said. And the "all at once" part is literally true because if you
increment the pointer, it points to the next whole array.

> And so it was the C++ pointer to array system was implemented. And the C++
> standards were written.

LOL. You make it sound like the genesis from the bible. Yet I doubt you
have any clue how C++ really came to existence. I know I don't, because
I wasn't there.

> If you think its bullshit then complain tot he authoroties. I think its
> pretty simple, flexible and very easy to use. I'm happy with it :-)

To you, those pointers are ducks:

If it looks like a duck, quacks like a duck, toddles like a duck, then
it must be a duck!

If it looks like a pointer to an array, behaves like a pointer to an
array, then it must be a pointer to an array!

If it looks like the function is part of an object, and can be used as
if it were part of an object, then it must be part of an object!

And to you that's good enough and all you need to know and want to know.
You have made your opinion. To you that's how it is and how it has to
be. You don't care how it really is, and everyone who tries to tell you
that in reality it's a little bit different gets snubbed.

> GL

Luck is not involved here.

Peter

 Paul 03-23-2011 01:29 PM

Re: You snipped something.

"Leigh Johnston" <leigh@i42.co.uk> wrote in message
news:nKudnYNstrH3ixTQnZ2dnUVZ8gKdnZ2d@giganews.com ...
> On 22/03/2011 21:28, Paul wrote:
>>
>>>> Odd multiples of > denotes Leigh *******s..
>>>>
>>>>>>>>> You fail yet again. I never said "pa" was not a pointer to an
>>>>>>>>> array;
>>>>>>>>> of course it is a pointer to an array; it is a pointer to a 1d
>>>>>>>>> array
>>>>>>>>> of type int[42].

No its a pointer to a 2D array of objects of type int[42];

>>>>>>>>>
>>>>>>>> It's a pointer to a 2d array
>>>>>>>> According to you any dynamic array is, not unlike you, 1 dimension
>>>>>>>> short
>>>>>>>> of a picnic.
>>>>>>>
>>>>>>> int (*pa)[42] = new int[42][42];
>>>>>>>
>>>>>>> "pa" is a pointer to a 1D array of type int[42]; this is an
>>>>>>> indisputable fact. The fact that what it points to is the initial
>>>>>>> element of a 2D array of type int[42][42] is irrelevant.
>>>>>>>

No its a pointer to a 2D array of objects of type int[42];

>>>>>> It's a pointer to....*drumroll* ..... what it points-to .
>>>>>> You are a confused idiot. Read the standards.
>>>>>
>>>>>
>>>> The standard states : "If the * operator, either explicitly or
>>>> implicitly as
>>>> a result of subscripting, is applied to this pointer, the result is the
>>>> pointedto (n - 1 )dimensional array"
>>>> ............
>>>> (*pa) produces the **pointedto** (n-1) dimensional array. That is....
>>>> if pa
>>>> is the **pointedto** 2dim array(which it is) then derefenrencing it
>>>> should
>>>> result in a 1dim array.
>>>>
>>>> std::cout<< typeid(*pa).name(); /*int [42]*/
>>>>
>>>> e voila!
>>>> Proven wrong once again.
>>>> READ THE STANDARDS.
>>>>
>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> READ THE C++ STANDARDS.
>>>>>>>> "A consistent rule is followed for multidimensional arrays. If E
>>>>>>>> is an
>>>>>>>> ndimensional
>>>>>>>> array of rank
>>>>>>>> i´ j´ . . . ´k, then E appearing in an expression is converted to a
>>>>>>>> pointer to an (n - 1 )dimensional
>>>>>>>> array
>>>>>>>> with rank j´ . . . ´k. If the * operator, either explicitly or
>>>>>>>> implicitly as a result of subscripting, is applied to
>>>>>>>> this pointer, the result is the pointedto
>>>>>>>> (n - 1 )dimensional
>>>>>>>> array, which itself is immediately converted
>>>>>>>> into a pointer."
>>>>>>>
>>>>>>> Irrelevant; what is relevant is the type of an object.
>>>>>>>
>>>>>> I rest my case.
>>>>
>>>>
>>>> Lets see how he tries to wangle out of this one :)
>>>>
>>>
>>> The inane ramblings of a demented freak.
>>>

>> So it's safe to assert you have created your own version f the C++
>> language. And you refuse to accept the real C++ language, even when it's
>> presented to you in plain black'n'white.
>>
>> GL troll , noob and idiot. :-)
>>

>
> I hope you were lying about your age because a 57 year old behaving like
> you do is only explainable if you have just woken up from a 40 year coma.
>
> Take your pills.
>

So you accept you are nothing more than a troll, noob and idiot. Or do you
accept that you were/are wrong?
Even if i was on medication it would obvioulsy be a good thing because it
makes me think in a correct way, unlike you( whether you take pills or
not ). :-)

Once again you have been PROVEN WRONG!
I count that to be about 10 v 0 to me , I win. ner ner noob.

 Paul 03-23-2011 04:31 PM

Re: You snipped something.

"Leigh Johnston" <leigh@i42.co.uk> wrote in message
news:vK2dne4XH4YOZBTQnZ2dnUVZ8tqdnZ2d@giganews.com ...
> On 23/03/2011 13:29, Paul wrote:
>>>>>> Odd multiples of > denotes Leigh *******s..
>>>>>>
>>>>>>>>>>> You fail yet again. I never said "pa" was not a pointer to an
>>>>>>>>>>> array;
>>>>>>>>>>> of course it is a pointer to an array; it is a pointer to a 1d
>>>>>>>>>>> array
>>>>>>>>>>> of type int[42].

>>
>> No its a pointer to a 2D array of objects of type int[42];
>>
>>>>>>>>>>>
>>>>>>>>>> It's a pointer to a 2d array
>>>>>>>>>> According to you any dynamic array is, not unlike you, 1
>>>>>>>>>> dimension
>>>>>>>>>> short
>>>>>>>>>> of a picnic.
>>>>>>>>>
>>>>>>>>> int (*pa)[42] = new int[42][42];
>>>>>>>>>
>>>>>>>>> "pa" is a pointer to a 1D array of type int[42]; this is an
>>>>>>>>> indisputable fact. The fact that what it points to is the initial
>>>>>>>>> element of a 2D array of type int[42][42] is irrelevant.
>>>>>>>>>

>>
>> No its a pointer to a 2D array of objects of type int[42];
>>
>>>>>>>> It's a pointer to....*drumroll* ..... what it points-to .
>>>>>>>> You are a confused idiot. Read the standards.
>>>>>>>
>>>>>>>
>>>>>> The standard states : "If the * operator, either explicitly or
>>>>>> implicitly as
>>>>>> a result of subscripting, is applied to this pointer, the result is
>>>>>> the
>>>>>> pointedto (n - 1 )dimensional array"
>>>>>> ............
>>>>>> (*pa) produces the **pointedto** (n-1) dimensional array. That is....
>>>>>> if pa
>>>>>> is the **pointedto** 2dim array(which it is) then derefenrencing it
>>>>>> should
>>>>>> result in a 1dim array.
>>>>>>
>>>>>> std::cout<< typeid(*pa).name(); /*int [42]*/
>>>>>>
>>>>>> e voila!
>>>>>> Proven wrong once again.
>>>>>> READ THE STANDARDS.
>>>>>>
>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> READ THE C++ STANDARDS.
>>>>>>>>>> "A consistent rule is followed for multidimensional arrays. If E
>>>>>>>>>> is an
>>>>>>>>>> ndimensional
>>>>>>>>>> array of rank
>>>>>>>>>> i´ j´ . . . ´k, then E appearing in an expression is converted
>>>>>>>>>> to a
>>>>>>>>>> pointer to an (n - 1 )dimensional
>>>>>>>>>> array
>>>>>>>>>> with rank j´ . . . ´k. If the * operator, either explicitly or
>>>>>>>>>> implicitly as a result of subscripting, is applied to
>>>>>>>>>> this pointer, the result is the pointedto
>>>>>>>>>> (n - 1 )dimensional
>>>>>>>>>> array, which itself is immediately converted
>>>>>>>>>> into a pointer."
>>>>>>>>>
>>>>>>>>> Irrelevant; what is relevant is the type of an object.
>>>>>>>>>
>>>>>>>> I rest my case.
>>>>>>
>>>>>>
>>>>>> Lets see how he tries to wangle out of this one :)
>>>>>>
>>>>>
>>>>> The inane ramblings of a demented freak.
>>>>>
>>>> So it's safe to assert you have created your own version f the C++
>>>> language. And you refuse to accept the real C++ language, even when
>>>> it's
>>>> presented to you in plain black'n'white.
>>>>
>>>> GL troll , noob and idiot. :-)
>>>>
>>>
>>> I hope you were lying about your age because a 57 year old behaving
>>> like you do is only explainable if you have just woken up from a 40
>>> year coma.
>>>
>>> Take your pills.
>>>

>>
>> So you accept you are nothing more than a troll, noob and idiot. Or do
>> you accept that you were/are wrong?

>
> I accept neither.
>

You do not accept the text in the C++ standard as a rule for the language?

<snip trolling>

 Paul 03-23-2011 05:24 PM

Re: You snipped something.

"Leigh Johnston" <leigh@i42.co.uk> wrote in message
news:ZoOdnQX6Y-2FvhfQnZ2dnUVZ8jGdnZ2d@giganews.com...
> On 23/03/2011 16:31, Paul wrote:
>>
>> "Leigh Johnston" <leigh@i42.co.uk> wrote in message
>> news:vK2dne4XH4YOZBTQnZ2dnUVZ8tqdnZ2d@giganews.com ...
>>> On 23/03/2011 13:29, Paul wrote:
>>>>>>>> Odd multiples of > denotes Leigh *******s..
>>>>>>>>
>>>>>>>>>>>>> You fail yet again. I never said "pa" was not a pointer to an
>>>>>>>>>>>>> array;
>>>>>>>>>>>>> of course it is a pointer to an array; it is a pointer to a 1d
>>>>>>>>>>>>> array
>>>>>>>>>>>>> of type int[42].
>>>>
>>>> No its a pointer to a 2D array of objects of type int[42];
>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>> It's a pointer to a 2d array
>>>>>>>>>>>> According to you any dynamic array is, not unlike you, 1
>>>>>>>>>>>> dimension
>>>>>>>>>>>> short
>>>>>>>>>>>> of a picnic.
>>>>>>>>>>>
>>>>>>>>>>> int (*pa)[42] = new int[42][42];
>>>>>>>>>>>
>>>>>>>>>>> "pa" is a pointer to a 1D array of type int[42]; this is an
>>>>>>>>>>> indisputable fact. The fact that what it points to is the
>>>>>>>>>>> initial
>>>>>>>>>>> element of a 2D array of type int[42][42] is irrelevant.
>>>>>>>>>>>
>>>>
>>>> No its a pointer to a 2D array of objects of type int[42];
>>>>
>>>>>>>>>> It's a pointer to....*drumroll* ..... what it points-to .
>>>>>>>>>> You are a confused idiot. Read the standards.
>>>>>>>>>
>>>>>>>>>
>>>>>>>> The standard states : "If the * operator, either explicitly or
>>>>>>>> implicitly as
>>>>>>>> a result of subscripting, is applied to this pointer, the result is
>>>>>>>> the
>>>>>>>> pointedto (n - 1 )dimensional array"
>>>>>>>> ............
>>>>>>>> (*pa) produces the **pointedto** (n-1) dimensional array. That
>>>>>>>> is....
>>>>>>>> if pa
>>>>>>>> is the **pointedto** 2dim array(which it is) then derefenrencing it
>>>>>>>> should
>>>>>>>> result in a 1dim array.
>>>>>>>>
>>>>>>>> std::cout<< typeid(*pa).name(); /*int [42]*/
>>>>>>>>
>>>>>>>> e voila!
>>>>>>>> Proven wrong once again.
>>>>>>>> READ THE STANDARDS.
>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> READ THE C++ STANDARDS.
>>>>>>>>>>>> "A consistent rule is followed for multidimensional arrays. If
>>>>>>>>>>>> E
>>>>>>>>>>>> is an
>>>>>>>>>>>> ndimensional
>>>>>>>>>>>> array of rank
>>>>>>>>>>>> i´ j´ . . . ´k, then E appearing in an expression is converted
>>>>>>>>>>>> to a
>>>>>>>>>>>> pointer to an (n - 1 )dimensional
>>>>>>>>>>>> array
>>>>>>>>>>>> with rank j´ . . . ´k. If the * operator, either explicitly or
>>>>>>>>>>>> implicitly as a result of subscripting, is applied to
>>>>>>>>>>>> this pointer, the result is the pointedto
>>>>>>>>>>>> (n - 1 )dimensional
>>>>>>>>>>>> array, which itself is immediately converted
>>>>>>>>>>>> into a pointer."
>>>>>>>>>>>
>>>>>>>>>>> Irrelevant; what is relevant is the type of an object.
>>>>>>>>>>>
>>>>>>>>>> I rest my case.
>>>>>>>>
>>>>>>>>
>>>>>>>> Lets see how he tries to wangle out of this one :)
>>>>>>>>
>>>>>>>
>>>>>>> The inane ramblings of a demented freak.
>>>>>>>
>>>>>> So it's safe to assert you have created your own version f the C++
>>>>>> language. And you refuse to accept the real C++ language, even when
>>>>>> it's
>>>>>> presented to you in plain black'n'white.
>>>>>>
>>>>>> GL troll , noob and idiot. :-)
>>>>>>
>>>>>
>>>>> I hope you were lying about your age because a 57 year old behaving
>>>>> like you do is only explainable if you have just woken up from a 40
>>>>> year coma.
>>>>>
>>>>> Take your pills.
>>>>>
>>>>
>>>> So you accept you are nothing more than a troll, noob and idiot. Or do
>>>> you accept that you were/are wrong?
>>>
>>> I accept neither.
>>>

>> You do not accept the text in the C++ standard as a rule for the
>> language?

>
> Of course I do; now show me what I have supposedly written that
> contradicts the Standard; from what I have seen you have done exactly that
> on numerous occasions in the past few months. You seem to have a habit of
> posting parts of the standard unrelated to a point under discussion and of
> posting false claims of contradictions of the Standard.
>

Ok lets start with just one of your statements in this post:

>>>>>>>>>>> int (*pa)[42] = new int[42][42];
>>>>>>>>>>>
>>>>>>>>>>> "pa" is a pointer to a 1D array of type int[42]; this is an
>>>>>>>>>>> indisputable fact. The fact that what it points to is the
>>>>>>>>>>> initial
>>>>>>>>>>> element of a 2D array of type int[42][42] is irrelevant.

Wrong its a pointer to a 2d array according to the C++ standards.

(*pa) produces the pointedto (n-1) dimensional array. That is.... if pa is
the pointedto 2dim array(which it is) then derefenrencing it should result
in a 1dim array.

std::cout<< typeid(*pa).name(); /* Voila, dereferencing produces a 1dim
array.*/

The standard states : "If the * operator, either explicitly or implicitly as
a result of subscripting, is applied to this pointer, the result is the
pointedto (n - 1 )dimensional array".

 Paul 03-23-2011 06:31 PM

Re: You snipped something.

"Leigh Johnston" <leigh@i42.co.uk> wrote in message
news:HOmdndeFvu4pqBfQnZ2dnUVZ8qWdnZ2d@giganews.com ...
> On 23/03/2011 17:24, Paul wrote:
>>>>> On 23/03/2011 13:29, Paul wrote:
>>>>>>>>>> Odd multiples of > denotes Leigh *******s..
>>>>>>>>>>
>>>>>>>>>>>>>>> You fail yet again. I never said "pa" was not a pointer to
>>>>>>>>>>>>>>> an
>>>>>>>>>>>>>>> array;
>>>>>>>>>>>>>>> of course it is a pointer to an array; it is a pointer to
>>>>>>>>>>>>>>> a 1d
>>>>>>>>>>>>>>> array
>>>>>>>>>>>>>>> of type int[42].
>>>>>>
>>>>>> No its a pointer to a 2D array of objects of type int[42];
>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>> It's a pointer to a 2d array
>>>>>>>>>>>>>> According to you any dynamic array is, not unlike you, 1
>>>>>>>>>>>>>> dimension
>>>>>>>>>>>>>> short
>>>>>>>>>>>>>> of a picnic.
>>>>>>>>>>>>>
>>>>>>>>>>>>> int (*pa)[42] = new int[42][42];
>>>>>>>>>>>>>
>>>>>>>>>>>>> "pa" is a pointer to a 1D array of type int[42]; this is an
>>>>>>>>>>>>> indisputable fact. The fact that what it points to is the
>>>>>>>>>>>>> initial
>>>>>>>>>>>>> element of a 2D array of type int[42][42] is irrelevant.
>>>>>>>>>>>>>
>>>>>>
>>>>>> No its a pointer to a 2D array of objects of type int[42];
>>>>>>
>>>>>>>>>>>> It's a pointer to....*drumroll* ..... what it points-to .
>>>>>>>>>>>> You are a confused idiot. Read the standards.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>> The standard states : "If the * operator, either explicitly or
>>>>>>>>>> implicitly as
>>>>>>>>>> a result of subscripting, is applied to this pointer, the
>>>>>>>>>> result is
>>>>>>>>>> the
>>>>>>>>>> pointedto (n - 1 )dimensional array"
>>>>>>>>>> ............
>>>>>>>>>> (*pa) produces the **pointedto** (n-1) dimensional array. That
>>>>>>>>>> is....
>>>>>>>>>> if pa
>>>>>>>>>> is the **pointedto** 2dim array(which it is) then
>>>>>>>>>> derefenrencing it
>>>>>>>>>> should
>>>>>>>>>> result in a 1dim array.
>>>>>>>>>>
>>>>>>>>>> std::cout<< typeid(*pa).name(); /*int [42]*/
>>>>>>>>>>
>>>>>>>>>> e voila!
>>>>>>>>>> Proven wrong once again.
>>>>>>>>>> READ THE STANDARDS.
>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> READ THE C++ STANDARDS.
>>>>>>>>>>>>>> "A consistent rule is followed for multidimensional arrays.
>>>>>>>>>>>>>> If E
>>>>>>>>>>>>>> is an
>>>>>>>>>>>>>> ndimensional
>>>>>>>>>>>>>> array of rank
>>>>>>>>>>>>>> i´ j´ . . . ´k, then E appearing in an expression is
>>>>>>>>>>>>>> converted
>>>>>>>>>>>>>> to a
>>>>>>>>>>>>>> pointer to an (n - 1 )dimensional
>>>>>>>>>>>>>> array
>>>>>>>>>>>>>> with rank j´ . . . ´k. If the * operator, either explicitly
>>>>>>>>>>>>>> or
>>>>>>>>>>>>>> implicitly as a result of subscripting, is applied to
>>>>>>>>>>>>>> this pointer, the result is the pointedto
>>>>>>>>>>>>>> (n - 1 )dimensional
>>>>>>>>>>>>>> array, which itself is immediately converted
>>>>>>>>>>>>>> into a pointer."
>>>>>>>>>>>>>
>>>>>>>>>>>>> Irrelevant; what is relevant is the type of an object.
>>>>>>>>>>>>>
>>>>>>>>>>>> I rest my case.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Lets see how he tries to wangle out of this one :)
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> The inane ramblings of a demented freak.
>>>>>>>>>
>>>>>>>> So it's safe to assert you have created your own version f the C++
>>>>>>>> language. And you refuse to accept the real C++ language, even when
>>>>>>>> it's
>>>>>>>> presented to you in plain black'n'white.
>>>>>>>>
>>>>>>>> GL troll , noob and idiot. :-)
>>>>>>>>
>>>>>>>
>>>>>>> I hope you were lying about your age because a 57 year old behaving
>>>>>>> like you do is only explainable if you have just woken up from a 40
>>>>>>> year coma.
>>>>>>>
>>>>>>> Take your pills.
>>>>>>>
>>>>>>
>>>>>> So you accept you are nothing more than a troll, noob and idiot. Or
>>>>>> do
>>>>>> you accept that you were/are wrong?
>>>>>
>>>>> I accept neither.
>>>>>
>>>> You do not accept the text in the C++ standard as a rule for the
>>>> language?
>>>
>>> Of course I do; now show me what I have supposedly written that
>>> contradicts the Standard; from what I have seen you have done exactly
>>> that on numerous occasions in the past few months. You seem to have a
>>> habit of posting parts of the standard unrelated to a point under
>>> discussion and of posting false claims of contradictions of the
>>> Standard.
>>>

>>
>> Ok lets start with just one of your statements in this post:
>>
>>>>>>>>>>>>> int (*pa)[42] = new int[42][42];
>>>>>>>>>>>>>
>>>>>>>>>>>>> "pa" is a pointer to a 1D array of type int[42]; this is an
>>>>>>>>>>>>> indisputable fact. The fact that what it points to is the
>>>>>>>>>>>>> initial
>>>>>>>>>>>>> element of a 2D array of type int[42][42] is irrelevant.

>>
>> Wrong its a pointer to a 2d array according to the C++ standards.
>>
>> (*pa) produces the pointedto (n-1) dimensional array. That is.... if pa
>> is the pointedto 2dim array(which it is) then derefenrencing it should
>> result in a 1dim array.

>
> (*pa) produces the one dimensional array because pa is a pointer to a one
> dimensional array (not a pointer to a two dimensional array), as I said;
> ergo the only thing I am contradicting is your nonsense not the standard.

If pa points to an 1dim array how can (*pa) would produce a 1dim array?
Obviously this is incorrect as the standard clearly states that (*pa) will
produce an (n-1) dimensional array.

<snip trolling>

All times are GMT. The time now is 04:07 PM.