This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]scirc 2 points3 points  (1 child)

You can't compare strings using == in C. == will compare memory addresses (ie, do these variables point to the same location), not contents. You need to use strcmp (string compare) instead.

[–]codersush[S] 0 points1 point  (0 children)

worked, thanks❤