while(name == "mode")
name is a pointer to a string. It will NEVER equal a constant string. They are completely different memory locations, so they will never be equal. Look at strcmp().
while(name == "mode")
name is a pointer to a string. It will NEVER equal a constant string. They are completely different memory locations, so they will never be equal. Look at strcmp().