Avatar
    Rating
    38
    Posts
    5291
    Creed
    Action
    Joined
    12.18.07

ʊIrishancest

Legally Certified Warthog Operator

The pattern is that it converts the letters to their ascii values and then returns the difference of 2 minus 1 i think. So the longer the second word the larger the number, or vice versa if it's 1 - 2. There is also a strncmp() which does the same thing as strcmp() except you have the option to only compare a certain number of chars. I also wrote my own strcmp for school that isn't case sensitive, but I'd have to dig that up. Glad I could help though.
05.30.08 10:45 pm

Replies

    • Avatar
      Rank
      Private
      Creed
      Role-Playing
      Joined
      12.27.07

    ɤ6od53nt

    Casts Magic Missile

    well hey, if you happen upon that file, send a sample my way. I can't even fathom how to make something not case sensitive in C yet!

    6od53nt == noob!! ;)
    ---
    "For the Glory of my LORD God!" --outcome of my first program
    05.30.08 11:12 pm
      • Avatar
        Rank
        Staff Sergeant
        Creed
        Action
        Joined
        12.18.07

      ʊIrishancest

      Legally Certified Warthog Operator

      So you know that all letters have an equivalent ascii numerical equivalent. So basically you check if it is within the capital or lowercase range, and then set it specifically to one or the other. You do this to every character in both strings, and then compare. At that point they should all be either uppercase or lowercase, depending on what you chose. That is the basics of it at least. If I find the code, I'll definitely show it to you. And if you need more of an explanation, i can give it to you.
      ---
      Beware. The Internewt is real!
      I'll have a loil, on the rocks.
      Come Riot over in Napalm Chat: http://www.napalmriot.com/chat/
      05.30.08 11:20 pm