calling a function inside main()
I am having more troubles in my future reference program...
I have this function:
Code:
char User_Choice;
void userDecision(char User_Choice) {
std::cout << "Do you like the number 3? Yes=Y, No=N" << endl;
std::cin >> 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;
}
}
And I need to invoke/call it inside the function main().
I am trying to do it like this:
Code:
userDecision(char User_Decision);
But it's not working...any help?