mero42
02-19-2005, 08:27 PM
Hello, I am having some problems with this piece of code.
char User_Decision;
void DoYouLikeThree(){
cout << "Do you like the number 3? (Yes=Y, No=N)" << endl;
cin >> User_Decision;
if (User_Decision=y){
cout << "You are cool" << endl;
}
else {
if (User_Decision=n)
cout << "You are uncool" << endl;
}
}
What am I doing wrong? (This is just a portion of the program, I have #include <iostream> which should have all the definitions for cout, etc.
char User_Decision;
void DoYouLikeThree(){
cout << "Do you like the number 3? (Yes=Y, No=N)" << endl;
cin >> User_Decision;
if (User_Decision=y){
cout << "You are cool" << endl;
}
else {
if (User_Decision=n)
cout << "You are uncool" << endl;
}
}
What am I doing wrong? (This is just a portion of the program, I have #include <iostream> which should have all the definitions for cout, etc.