Hi Everyone,
I am taking C++ for the second time and I am understanding it better this time around. I have an assignment that needs a switch (got that, know how to do it), I have put if/else statements inside of the cases. The thing I can't get to work is:
1. If the user enters the incorrect case (i.e. any letter besides a, b, or c) before going to the default it will jump to my next cout statement, then it prompts for the user to re-enter the correct letter, after that it ends. So I need advice on how to get it to stop asking for the hours used after the wrong input, and I need it to continue to run after the correct input is re-entered. I hope that I haven't confused anyone to bad. I have the code wrote, but am not real sure what I can or can't post or even how it is to be posted. Also we are using jGrasp with the cygwin compiler. Thanks.
Recommended Answers
Jump to Postbut, if you are evaluating a character, along with another one, say in this case is capital form, can't you do it with an or
||
expression?case ('a'||'A')
Jump to Post>it had been a long time since i got you mad at me huh narue?
If you want to get me mad, keep using jeje. It's a big pet peeve of mine. I used to play a game called X-wing vs. Tie Fighter and was actually one of the better …
Jump to Post>Seems to me, that this is more a a gossip forum, than a help forum.
I'd disagree, but that's unlikely to change your view. And quite frankly, if you're reacting like a child to something so trivial, I'm not interested in changing your view. You can whine, cry, stamp your …
Jump to Post> Seems to me, that this is more a a gossip forum, than a help forum.
You are the only one with this kind of opinion I guess.> I came here for help and advice.
If you still haven't been able to find those, then you are not …
Jump to Post>By the way, I solved the problem without the your so called solutions.
I'm glad you solved your problem. Now I can put on my moderator hat and lock this thread to keep you from starting a real flame war.>I think that if there is any disrespecting going …
All 25 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.