perror adding Success to end of error text
Not really sure what is going on here. The error message I have prints out and the program quits but it seems "Success" is being added to the end of my error message
Code:
void error(const char* msg)
{perror(msg);
exit(1);
}
Then when I have an error I do:
Code:
error("ERROR: input contains bad characters");
The program exits but the message that is printed is:
"ERROR: input contains bad characters: Success"
Any idea why I am getting this success or how to fix this?