|
-
Jan 10th, 2003, 06:21 PM
#1
Thread Starter
Addicted Member
Pointers to arrays
say i have a function that accepts a pointer like:
void SomeFunction(Obj *pObj);
and then i have an array of objects like:
Obj *myObjects = new Obj[10];
i know you can pass myObjects and it will be a pointer to the first element, but would it be possible to do this:
SomeFunction(&myObjects[5]) and thus just have pObj point to element 5 of myObjects?
thanks
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
|