Re: strcmp, please me understand this
Hi!
Marcus schrieb:
> hi, i'm really confused as to what's going on here:
>
> char *foo = "ABC";
> char *foo2 = "ABC;
Change these to:
const char* const foo = "ABC";
const char* const foo2 = "ABC";
And try again. If this does not discover your problem then you are in
real trouble.
> how can this be? am i not understanding how strcmp works?
It should work as expected but you seem to mess with the data somewhere.
Somewhere we can't see.
Frank
|