Why are my outputs like so

Jul 28, 2012 at 1:47am
im comparing my 2 strings via stricmp and im getting an output but im wondering why it does it like i think it does

str1 = "a"
str2 = "b"

since 1 is less than 2 and according to letter the output is -1
i think thats how it goes at least

mine is like

str1 = "SzBouSBwjT"
str2 = "Ryan"

when i use this with stricmp it only compares letter 1 to 1 so
since 1 is greater than 2 its 1

how do i make it so it compares all if the letters possible?
Jul 28, 2012 at 1:56am
Well, maybe I don't understand, but what return value do you expect? This way, you know which one comes first or if they are equal. What result do you expect to get exactly?
Jul 28, 2012 at 2:05am
i dont expect any specific result

i want it so that way its more complicated when using for my authentication

if it only compares letter one then any same character amount name starting with R will return the same value.. i want it so that it will return a value that can only be achieved by having the same name as str2 or changing str1 which will look like gibberish in my hex
Jul 28, 2012 at 2:33am
Nooo, try it for:
str1 = "snaxpax"
str2 = "snaxpak"

And you'll get the result saying, that snaxpak is earlier,so some negative value as an answer. It compares first letter, if they are equal, it compares next and so on and so on.
Jul 28, 2012 at 2:58am
ooo ty
Topic archived. No new replies allowed.