Jun 27, 2012 at 10:13am
Say I have a struct.
1 2 3 4 5
|
struct surface
{
...
void AddToQueue();
};
|
So I have a global array of this struct.
surface drawing_queue[1000];
Here is the function from the struct:
1 2 3 4
|
void surface::AddToQueue()
{
drawing_queue[4] = ???;
}
|
What would I put for "???" to set
drawing_queue[4]
equivalent to the parent surface (of the function that is called)?
In other words, if I call:
1 2
|
surface surface_to_add;
surface_to_add.AddToQueue();
|
What would I do to the function that would make it so that
drawing_queue[4]
is pointing to
surface_to_add
?
Last edited on Jun 27, 2012 at 10:16am
Jun 27, 2012 at 10:41am
Yeah. That would be better.
Thanks! I just haven't done this kind of thing before.
Last edited on Jun 27, 2012 at 10:46am