Exit mistake

Hi everyone!

Can you help me with my assignment
I'm truing to write a function which will give the message and exit the program, but when I'm trying to compile the system always gives me a mistake that exit(1)isn't declared. What to do? does anybody have an idea?

1
2
3
4
5
void error(char *msg)
{
perror(msg);
exit(1);// this is the place where the error occurs
}
did you #include <cstdlib> ?
No, I didn't. what does it library stands for?
i've just included it, works ok now.
many thanks!!!
FYI, it stands for C Standard Library.
Topic archived. No new replies allowed.