What did I do wrong? I feel like crying.
Each time I use functions, I'm always getting errors I don't understand. The problem is to write a Menu program that a user can select from the list of options. I made it so that if a user enters a number, it says that you entered so and so option. Please don't just correct my code, tell me what I need to learn so that I will know this thing, please. Here is the my code. #include <iostream> #include <string> using namespace std; string list(char easy, char normal, char hard); /*char list(string easy, string mormal, string hard);*/ int main() { string choice = char list(char easy, char normal, char hard); cout << "Your option is: " << choice << endl; return 0; } /*string list(string easy, string normal, string Hard) { cout << Easy }*/ string list(char easy, char normal, char hard) { char easy; { cout << "1. Easy"; cin >> easy; if (easy == 1) } char easy; char normal; { cout << "2. Normal"; cin >> normal; if (normal == 2) } return normal; char hard; { cout << "3. Hard?"; cin >> hard; if (hard == 3) } return hard; }