C++ help
Go to solution
Solved by madknight3,
How do I check to see if they used more or less than 4 digits on the year?
I suppose you could use the obvious
if (year < 1000 || year > 9999)
edit: Just saw this
But that would allow a user to enter something like 1, or 333. I need it to be in 4 digits, so something like 0001 or 0333
You could get the input as a string instead of an int and use length().

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now