|
-
September 26th, 2002, 11:44 PM
#1
Junior Member
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!
There are 10 types of people in this world, The ones that understand binary and the ones that dont.
-
September 26th, 2002, 11:55 PM
#2
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
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."
- Albert Einstein
-
September 27th, 2002, 12:38 AM
#3
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|