How to output message is input is the wrong length

How do I output a message is the input is the wrong length

1
2
3
4
5
6
7
8
9
10
11
12
int main()
{
	int code;
	int  year , day , month;
	
	cout << "Enter a date:";
	cin >> digit>> code;

return 0;
}
	
Read it into a string and use .length()
Topic archived. No new replies allowed.