Return from the function with a return statement and the program will continue to run from that point on. But if the program depends on results from the function that errored, you'll have problems later on.
deceptikon
Challenge Accepted
3,460 posts since Jan 2012
Reputation Points: 822
Solved Threads: 474
Skill Endorsements: 57
Oh, I didn't see that a seg fault was one of the potential errors. My bad.
deceptikon
Challenge Accepted
3,460 posts since Jan 2012
Reputation Points: 822
Solved Threads: 474
Skill Endorsements: 57
function starts with a void....
Then you would use an empty return statement:
void foo()
{
...
if (some error)
{
return;
}
...
}
deceptikon
Challenge Accepted
3,460 posts since Jan 2012
Reputation Points: 822
Solved Threads: 474
Skill Endorsements: 57