terminating a while loop with a string
I am doing my nut and have come to the conclusion that you can't terminate a while loop using a String.
while ( userInput != "end")
userInput = dialogbox("Please enter your choice")
Obviously the above code is just an example, however I am trying to get my code to put each input by the user into a set.
I can compile the code and get the input from the user but when I input the string I have defined to terminate the loop, it just adds the input to the set. Do I have to format the string in a certain way??
Thanks in advance to any help given.