An error is thrown, and I'm not sure sure why:
physics.c:74: error: incompatible types in initialization
typedef struct gameBody gameBody;
struct gameBody
{
cpBody *body;
int numberOfShapes;
cpShape *arrayOfShapes; //This stores an array of pointers to Shapes
};
//Struct that stores the cpSpace object and the array of pointers to the body objects
typedef struct gameSpace gameSpace;
struct gameSpace
{
cpSpace *space;
int numberOfObjects;
gameBody *arrayOfObjects; //This stores an array of gameBodys
};
for(int i = 0; i < space -> numberOfObjects; i++)
{
//body info
gameBody *gBody = space -> arrayOfObjects[i];
}