I've tried applying advice from other threads regarding the EXC_BAD_ACCESS message, but with no success. The note appears next to Node Create_Child (Node Parent_Node, int item) {
.
typedef struct {
int Win_Loss;
int parent;
int identifier;
int Object_Moved;
int Wolf;
int Goat;
int Salad;
int Boat;
} Node;
Node Create_Child (Node Parent_Node, int item) {
Node Child;
Child.Boat = (-1)*Parent_Node.Boat;
Child.Wolf = Parent_Node.Wolf;
Child.Goat = Parent_Node.Wolf;
Child.Salad = Parent_Node.Salad;
int* Child_Items[] = {&Child.Wolf, &Child.Goat, &Child.Salad, &Child.Boat};
Child.parent = Parent_Node.identifier;
Child_Items[item][0] *= (-1);
Child.Object_Moved = item;
return Child;
}
Any insight? Memory allocation doesn't seem to be the issue, but I'm probably not seeing something.