| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Help for super beginner
Hi I am taking a beginner C++ class and I can't get a simple Yes/No question to work. I declared the variable 'answer' as a char and here's my code ..
Code:
do
{
cout << "Need More Login Information? <y/n> : ";
cin >> answer;
}while(answer != 'y' || answer != 'n');
But even if I put in y or n it keeps asking me it over and over. I put a breakpoint in and investigated what the variable answer was holding. When I put in y it holds '121 y' and when I put in n it holds '110 n'. I don't put in a number though ... can someone help please? thanks |
|
#2
|
|||
|
|||
|
Oops. Nevermind I found my problem that was really stupid haha. Sorry, ignore this post!
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > Help for super beginner |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|