|
-
Apr 5th, 2002, 02:39 AM
#1
Thread Starter
Hyperactive Member
pointers in C
how do i point to a 2 dimensional array in C?
int array[3][3] = { {1,2,3} ,
{3,2,1},
{1,2,3}};
int *ptArray;
ptArray = array;
if pointing to a 1 dimensional array i would use *(ptArray+2) to point to the 3rd element of a 1D array.
how can i point to a 2D array lets say array[3][1] from the above example?
Thanks
i am just starting to learn C
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|