I am coding up a project, and I need the user to enter his 4 digit password. The password is always 4 digits. I want to make it so that when the user types the code in, it will be impossible to type more than the 4 digits. How can I do this? Is there a way to put a limit on the number of characters in cin << ? If you are not clear on what I'm saying please let me know. Thanks.