Thread: trouble w/ strcmp

  1. #1
    Registered User lord's Avatar
    Join Date
    Dec 2006
    Posts
    61

    trouble w/ strcmp

    deleted
    Last edited by lord; 03-30-2008 at 01:45 PM.

  2. #2
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    Use a printf() to visually inspect the values at runtime right at the strcmp().

    Todd
    Mainframe assembler programmer by trade. C coder when I can.

  3. #3
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    Or, better yet, set a break point and use your debugger. A couple weeks ago I showed my son, who is taking his first Java class, how to use an interactive debugger.

    He started laughing when I was stepping through the code. He said it was cheating, and like taking candy from a baby.

    Learn to use your debugger.

    Todd
    Mainframe assembler programmer by trade. C coder when I can.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Fucntion returns -1, Why?
    By Taper in forum C Programming
    Replies: 16
    Last Post: 12-08-2008, 06:30 PM
  2. help with switch statement
    By agentsmith in forum C Programming
    Replies: 11
    Last Post: 08-26-2008, 04:02 PM
  3. problem with strings
    By agentsmith in forum C Programming
    Replies: 5
    Last Post: 04-08-2008, 12:07 PM
  4. help with strcmp
    By blork_98 in forum C Programming
    Replies: 8
    Last Post: 02-21-2006, 08:23 PM
  5. strcmp
    By kryonik in forum C Programming
    Replies: 9
    Last Post: 10-11-2005, 11:04 AM