Help with cin
FredBill30 got it fixed 3 posts up.
Sorry, I couldn't help :(
Though personally I'd do this:
1 2 3 4 5 6 7
|
if (choice == 'y' || choice == 'Y')
{
x = true;
}
else if (choice == 'n' || choice == 'N')
x = false;
}
|
In case you have a user that's feeling like a rebel.(Not wanting to input lowercase)
Last edited on by Fredbill30
FredBill30 wrote: |
---|
Though personally I'd do this: |
if (choice == 'y' || choice == 'Y')
{
x = true;
}
else if (choice == 'n' || choice == 'N')
x = false;
}
|
I think that is a good idea too.
Thanks so much, everyone! It's really exciting to start getting into writing programs like this and seeing them work.
No problem.
daviddet wrote: |
---|
It's really exciting to start getting into writing programs like this and seeing them work. |
I know. I remember the first time I made a program that worked.
Ha, yea. Soon it starts to get addictive. :)
FredBill30 wrote: |
---|
Ha, yea. Soon it starts to get addictive. :) |
I know. I made my first program June 3, 2012 (I checked the date the file was created) haven't quit since. :D
Topic archived. No new replies allowed.