My assignment is to work with a phone number input using 3 functions besides the main function. When setting a character input, when lowercase, to toupper, how can that letter stay toupper when transferring it to the next function? Here is my code:
Also in the ToDigit function a switch should be used to determine if the digit is valid (a-z or 0-9) and convert letters to digits, but I though switches were mostly used for showing the user a message based on their input. Like if 1-3
1 2 3 4 5 6 7 8 9 10 11 12
switch (number)
{
case 1:
cout << "Good job" << endl;
break;
case 2:
cout << "Horrible" << endl;
break;
case 3:
cout << "You lose" << endl;
break;
}
2:
Actually, I never (which means: rarely) use switches for user output. Though that's of course what switches are usually being used for in beginner examples.