In my binary tree, I can delete values that have other values extending from it. If they don't, or if it is the only value, the program crashes. Not sure how to fix it. This is the deletion part of the code:

void delete_tree (binarytree *t, int x){ binarytree temp; if (!is_empty(*t)) { if (x == (*t)-> data) { if (((*t) -> left == NULL)&&((*t) -> right == NULL)) { temp = (*t); (*t) = NULL; free (temp); } if (((*t) -> left != NULL)&&((*t)-> right == NULL)) { temp = (*t); (*t) = (*t) -> left; free (temp); } if (((*t)-> left == NULL)&&((*t)-> right != NULL)) { temp = (*t); (*t) = (*t) -> right; free (temp); } if (((*t) -> left != NULL)&&((*t) -> right != NULL)) { temp = (*t)-> right; while (temp -> left != NULL) { temp = (*t) -> left; } temp -> left = (*t) ->left; temp = (*t); (*t) = (*t) -> right; free (temp); } } else { if ( x <= (*t) -> data) delete_tree(&(*t) -> left, x); else delete_tree(&(*t) -> right, x); } } else printf("No data found.\n");}

Look at line 16 - what happens when you get there and you have just been through lines 9 - 14? You have wiped out your tree and then on line 16 you are testing it.

There needs to be a return in your different cases - or an else before each

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children.
So, while being a kid is still extremely important, it’s also …

With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…