>My program SIGSEGV when it tries to delete the host[i]
The value of i at the time? Also the value of numberOfHosts and MAX_HOSTS_PER_SERVER would be useful. Also, can you come up with something we can compile and play with that still exhibits the problem? That way you'll get more than just guesses.