-
strcmp() & exit()
i have a question about the two functions in c++, strcmp & exit
strcmp: what does it actually do? How does it compare the strings?
exit: what's the integer input? is it the delay(in seconds) before the program kills itself?
thnx in advance for all your help!
-
Let me check for you in google.........
Ok, here it is
strcmp And exit
But I'm sure you could find it by yourself, By searching in www.google.com, which is a greate search engine, couldn't you?
Cheers
-
I agree you could have found it in google... in short, though, here's an swer:
strcmp = compares two strings character by character and returns the difference (as an integer).
exit = terminates the program. exit(0) represents an exit with no error. exit(1) represents an exit with an error. You can also use different numbers if you pipe the output of one program into the input of another program and use the integer as a flag to display a message or take another action.
AJ