My problem as the tittle suggest is that I am trying to make a telephone number program that outputs for example GET LOAN as 438-5626. So far my program works but it only as you can tell output a single digit from it's corresponding letter and another problem is that I need a hypen after the third digit and want to limit the program to allow me to enter lets say 30 letters but limit it to 7.
For the getline I was thinking getline(cin, letter) to limit it and im not sure if im on the right track or even where to begin with it.
For the if statement something like if (i == 3) cout << '-'; else cout << "error" << endl;
I have only been working with programming for about 2 and a half months so assume im not looking for something ahead of me even though it's nice to know about what im going to learn.
I figured that changing char to a string would help with my problem and maybe the if(letter >='A'&& letter<='Z'...) won't be required. Also the if statement seems to be taken care of by the default: statement in the case switch can anyone else give me advice on getting the hypen (-). Last thing since the while(letter != '#') letter was changed into a string I this can no longer work so should I just make a char named word or something?