Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pointer to a Multidimensional Array, how?

Status
Not open for further replies.

Legionaire

Technical User
May 8, 2003
33
US
ok, n00b qestion:

I want to use pointer arithmetic to manipulate members of a multidimensional array. But I can't figure out how to point to it!

int int_array[2][5];


+ ------- I want to point here.
|
v
[x][x][x][x][x] <--- int_array
[x][x][x][x][x]



simply creating an *intptr, then setting it = to int_array gives a &quot;cannot convert&quot; error.

creating a (intptr)[5], and setting it = to int_array[0] doesn't work either.

any ideas?
 
lol

ok i'm stupid

I just remember the & thing.

I retract my question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top