Assistance With Cell Phone Program

-
Last edited on
Hi ! Code tags pls

See if placing cin.ignore(80,'\n'); on the line just before cin >> plans; fixes ur problem.
Last edited on
This if (plans == 's' || 'S') is wrong, use if (plans == 's' || plans == 'S') same with the else condition.
-
Last edited on
@h3lpm3p1z
I don't remember ur program.. (why did u delete ur original post ? other ppl might find it useful to fix a problem in the future)

cin.ignore(80,'\n'); clears characters that are in the buffer until it reaches 80 characters or encounters the first newline character.

When using cin multiple times it is possible for the input stream to not be empty on those consecutive times. If this happens then the 2nd call to cin picks up the same characters that were in the stream which the first call to cin had, thus it doesn't wait for new user input.
Last edited on
Topic archived. No new replies allowed.