[Solved] C++ While loop in an infinite loop even on correct answer


It is impossible for this loop to ever end. The only possible way this look could end would be for type1 to be nor, fir, wat, … at the same time. You probably want to replace all ors (||), by ands (&&). In that case your loop would stop at the moment type1 is equal to one of the compared strings (nor, fir, wat… ), which of course is possible.

solved C++ While loop in an infinite loop even on correct answer