I have two sets of prompts. The user picks from 3 choices in the first prompt, the code executes and then prompt number two appears. Now when I read in the second prompt (the first time) it is invalid. when I read a second time, it is valid. Then it alternates back and forth--invalid then valid. What is the best way to read these two prompts without holding onto any newlines or CR's. I have every combination of scanf and getchar that I can think of and also using fflush(NULL); in between. All with less than desirable results.
What should I be using?
Thanks in advance,
J
What should I be using?
Thanks in advance,
J