I've just started learning C++ and am working on a few small programs with while loops. But I'm having trouble with them in cases where I am trying to run the loop until the end of a variably-long input statement. Here is an excerpt below where I try to output the corresponding telephone digits of a phrase that the user is prompted to input:
When I run this program, it builds without errors but only outputs the digit of the first letter typed. It seems to be getting stuck somewhere in the while loop but I just can't figure out why. Any suggestions?
(Please note I'm a new programmer so my vocabulary of c++ commands is quite small. Currently working through Malik 3rd edition, ch5 - repetition control structures)