!cin is a validator, that validates cin, if cin fails, it returns false,. It fails when invalid input is given, such as input being too long, or being non char. This is good because most compilers go into this random infinite loop after failing cin.
Ps: Me and my friend's channel is TNT clan, search it up, you might find me, runner