in C++
string phone_number
If asking for a 10 digit phone number for example, how would you ensure 10 digits are entered? Also, how would you ensure no characters were input by mistake. I am also curious how to ensure the user doesn't enter past the prompt by mistake (leaving it empty).