If I use assert() and the assertion fails then assert() will call abort(), ending the running program abruptly. I can\'t afford that
assert()
abort()
_set_error_mode(_OUT_TO_MSGBOX);
believe me, this function can help you.