Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C - C++ Learning > Re: order of ar...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 10 Topic 4079 of 4262
Post > Topic >>

Re: order of array subscripts

by Eric Sosman <Eric.Sosman@[EMAIL PROTECTED] > Mar 25, 2008 at 03:55 PM

vippstar@[EMAIL PROTECTED]
 wrote:
> 
> Hm.. now I'm confused too. is T arr[4][5] an array of 4 arrays of 5
> Ts? or an array of 5 arrays of 4 Ts?

     An easy way to sort this out is to ask what you get
when you supply just one index: What is arr[i]?  Let's
call it an X for the moment, just as a place-holder.  What
can we do with an X?  We can append [j], producing arr[i][j]
to access the i,j'th element of the original.  Since [j]
can run from 0 through 4, inclusive, an X must be an array
of five elements.  So arr[i] is an array of five elements,
and there are four of them.

> I believe it's the latter. (so, arr[0] is an array of 4 Ts)

     Maybe my way of sorting it out isn't so easy after all ...

> Moreover, in the FAQ in question 6.17 there is an additional link
> labeled "Yes, Virginia", but the link leads to a page with no content.
> (it is not an external link)
> Any idea what that is?

     It looks like a place-holder for something Steve never
got around to writing, possibly an account of a machine where
the dubious technique actually did/does fail.

-- 
Eric.Sosman@[EMAIL PROTECTED]

 




 10 Posts in Topic:
order of array subscripts
noway@[EMAIL PROTECTED]   2008-03-25 07:45:00 
Re: order of array subscripts
"Alf P. Steinbach&qu  2008-03-25 09:06:37 
Re: order of array subscripts
Keith Thompson <kst-u@  2008-03-25 09:00:23 
Re: order of array subscripts
vippstar@[EMAIL PROTECTED  2008-03-25 11:49:21 
Re: order of array subscripts
Andrey Tarasevich <and  2008-03-25 12:03:26 
Re: order of array subscripts
Eric Sosman <Eric.Sosm  2008-03-25 15:55:08 
Re: order of array subscripts
"Jim Langston"   2008-03-25 23:59:28 
Re: order of array subscripts
Keith Thompson <kst-u@  2008-03-26 00:43:57 
Re: order of array subscripts
Flash Gordon <spam@[EM  2008-03-26 07:38:23 
Re: order of array subscripts
pete <pfiland@[EMAIL P  2008-03-29 00:10:11 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Sep 6 13:44:37 CDT 2008.