How do you access a pointer to a pointer (besides using '**')?
I have a routine that is passed a pointer (an address of a structure). The
structure is the first in a series. When the routine finishes I want the
address to now point to the following structure to set it up for the next
time the routine is called. It works inside the function (the pointer
points to the next object), but when the function returns, the
address/pointer goes back to what it was before calling the function.
Here's the general idea in code. It's not my actual code but I didn't want
to waste anyone's time with the details which are probably unneccessary for
the question at hand.
<<<CODE>>>
void foo(ObjectType *oA); // Prototype
...
void foo(ObjectType *oA) {
...
}
...
Int8 i;
ObjectType oTemp;
...
// Have oTemp be the first object in memory in a series of ObjectType
objects.
...
for (i = 0; i < max; i++) {
foo(&oTemp); // Each time it moves to the next one in the series
}
<<<END>>>
This may be oversimplified to the point that it works. I can post the
actual offending code if this is not enough. Sorry.
--
Jimi Malcolm
Web Content Manager
inburst Internet Media
inburst.com
jimi.malcolm@inburst
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/