Okay, I'm writing a program , and it tends to crash often. So I was curious, how would I detect a program crash, and then do something after it. For instance, when it crashes log to a file what function crashed it, time/date, ect...
I don't need to time/date, but a printing out what function crashed it is something I need to know. I looked into atexit() and its not what I'm looking for for. If your curious, I am writing a MUD game, so I work with lots of different players playing at once. So when it crashes I need to save each character so that no data is lost. and then print out what function caused it so I can fix it.
any help would be most appreciated.