Below is a code fragment that I'm having trouble with. For some reason I get an infinite loop after entering the telephone number into the struct variable that is an int. I think it has something to do with alternating between getline and cin but even if I add the cin.ignore is still doesn't fix the problem. Was wondering if anyone notices anything that might help:
Here is what I have so far. It's inside a switch statement. Well the [count] is there so that the user will step through the struct entering the information that is requested. Here some more code to see what I am doing wrong:
If I enter one digit less than a full phone number then it works fine. But if I enter a whole phone number like 7078031940 then it goes into an infinite loop. Still trying to figure this out its pretty weird.