I'm trying to write a while loop to terminate a program when asked if you want to enter another name and the answer is no (or a number since I'm using character strings)
My first idea was to check the 0 element of the first name part asked for, but that does not work.
My second idea was to use strlen and as long as strlen for that name part was 1 (not counting the terminator) it would exit...that doesn't work either, it will terminate it, but only after a round of 111, and then entering 1.
Ideas and suggestions are welcome, I've never used a while loop to end repetition of functions with character strings/arrays.
I've heard somethin called a sentinel value, that may be what Im looking for