I just began learning to code C++ the other day, so bear with me.
I was trying to make a simple program where you enter your name and age and it repeats it back to you and asks your if the information you entered was correct.
What I'm trying to make is a line of code the tells the user that they entered and invalid number is they try to input anything other than 1 or 2.
You get to a point where it asks you to press 1 if the info is correct, and 2 if it isn't. The only problem is, when trying to make an if statement, it doesn't work. Here is what I did:
**
if(status != 1 or 2){
cout << "Value entered not valid. Type 1 if information is correct and 2 if it is not."<<endl;
}
**
What it does is it gives the error message even if I type one or two.