Thanks a bunch It has fixed the issue. I get no more crashes. One of the delete functions is commented out as it was the original and I didn't want to remove it in case I ever need to see where I was making mistakes. The reason I have 2 reapers is one is for normal rabbits that die at age 10 and the other is for vampire rabbits which die at age 50. I realise these could be put into one function but I decided to separate them since I was running into trouble and wanted to make things less complicated. I will definitely look at the site and practice with ints.
I started this exercise as I wanted practice with pointers and thought it would help me also understand their uses in real life scenarios, which I find hard to see if you look at the standard examples/tutorial for pointers, such as:
You're welcome. I had to find the bugs because I couldn't find any more problems with my own version of the remove functions.
The initial version without the else was advancing iter twice following a node deletion, hence some skip overs (missing cases that should be removed) and the occasional crash (when the node skipped over is the tail).
@LowestOne: I didn't see your post before posting. I didn't think to check as it was approaching 24 hours since last reply.
Ninja coincidence is amazing sometimes.
When you delete head, you never make it NULL. The phrase if (!head) only works if you have set it to NULL yourself.
I actually chased several ghosts around the room trying to fix my unbroken Reaper function, and that was one of them. The NULL being sought is the one marking end of list. Most functions are relying on this to terminate iteration, so there would be many problems if that didn't work right (and it would be AddNode's fault).