Local Function Definitions are illegal...very evil problem
Hi. This code is a portion of a whole program, and I get the error message stated in the thread title...but I can't seem to fix it, no matter what I do.
Here is the Code:
Code:
char User_Choice;
void UserThree(char User_Choice){
std::cout << "Do you like the number 3? (Yes=Y, No=N)\n";
std::cin >> User_Choice;
if {(User_Choice == y)
std::cout << "You are cool\n";
}
else {
if (User_Choice == n)
std::cout << "You are Un-cool\n";
}
else {
if (User_Choice != y, n)
std::cout << "Invalid Decision" << endl;
}
}
Can someone out there point out what I should do?