Adding Actors to an Array

I want to make my own array of actors.
Please consider the following code:
How do I add the happy actors to my array?
Please consider the following code:
- Code: Select all
int n; // actor count
Actor *allActors;
Actor *happyActors;
allActors = getAllActorsInCollision("gameArea.0", &n);
if(allActors)
{
int i;
for( i = 0; i < n; i++ )
{
if ( allActors[i].myMood == HAPPY )
{
// add to happy actor array
// ????????????????????????
}
}
}
How do I add the happy actors to my array?