if you send your full program we could help you more .
Code:
void userDecision(char User_Choice)
it means userdecision takes a char when it is called .
for calling the function you have written :
Code:
userDecision(char User_Decision);
(there is no need to write the type ( char ) before arguman name )
what is user_decision ?
if it is user_choice then why you read it in function userdecision again ?
I think you want to read user_choice in main and send it to ur function for doing this :
in main ->
Code:
std::cout << "Do you like the number 3? Yes=Y, No=N" << endl;
std::cin >> User_Choice;
userDecision(User_choice);
and your function be ->
Code:
void userDecision(char User_Choice) {
if (User_Choice == 'y') {
std::cout << "You are cool." << endl;
}
else if (User_Choice == 'n'){
std::cout << "You suck!" << endl;
}
else if (User_Choice != 'y' && User_Choice != 'n'){
std::cout << "Invalid Decision" << endl;
}
}
hope it helps