|
-
October 23rd, 2007, 09:52 AM
#5
Re: 2d array pointer
 Originally Posted by Ultimate Hammer
ok mind telling us what you're trying to do?
Trying to define a pointer to a 2d array which has a stride of 8.
If I know that my doubles are in a consecutive memory block at location p, and the stride is 8, then the notations
p[y][x]
and
p[y*8 + x]
should be equivalent, and hence I should be able to define
double * q = 0; ///ok
also
double q[][8] = 0; /// not ok.
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
|