If I have a variable called Tree * myTree, how could could I put this variable into an array of Tree*?
For example, I want to do something like:
Tree *allTrees[10];
allTrees = malloc(sizeof(Tree) * 10;
for (int i = 0; i < 10;i++)
{
allTrees[i] = malloc(sizeof(Tree));
}
allTrees[0] = myTree;
What am I doing wrong here?
)(chuckle)