Results 1 to 3 of 3

Thread: strcmp() & exit()

  1. #1
    Junior Member
    Join Date
    Aug 2002

    Question 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.

  2. #2
    Senior Member Unl3Ashed's Avatar
    Join Date
    Aug 2002
    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?

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."
    - Albert Einstein

  3. #3
    The Iceman Cometh
    Join Date
    Aug 2001
    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts