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++ Moderated > Accessing colum...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 9745 of 9983
Post > Topic >>

Accessing columns of 2D array

by mpho <tjabane@[EMAIL PROTECTED] > Jun 25, 2008 at 06:57 PM

Dear everyone. Is there a way to access columns of a 2D array
efficiently? For instance given Array[m][n], I want to manipulate the
columns Array[0 ... m-1][j] for 0 <= j <= n-1. The way arrays are
stored in C/C++, and their relation to pointers, requires that for
each array element (corresponding to a column) I must skip m-1
elements in the same row in order to get to the next element of the
same column. Thanks.

-- 
      [ See http://www.gotw.ca/resources/clcm.htm
for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
 




 5 Posts in Topic:
Accessing columns of 2D array
mpho <tjabane@[EMAIL P  2008-06-25 18:57:55 
Re: Accessing columns of 2D array
huili80@[EMAIL PROTECTED]  2008-06-26 03:57:57 
Re: Accessing columns of 2D array
Marsh Ray <marsh527@[E  2008-06-26 03:57:56 
Re: Accessing columns of 2D array
Tony Delroy <tony_in_d  2008-06-26 03:57:58 
Re: Accessing columns of 2D array
mpho <tjabane@[EMAIL P  2008-06-27 14:18:12 

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 15:35:03 CDT 2008.