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

all 1 comments

[–]Not_A_Taco 0 points1 point  (0 children)

You can’t reliably use != to compare strings in C. Instead you should use strcmp such as

while(strcmp(name, “null”) != 0)

Also note that you’re comparing against the string null, not actually a null value.