We're doing functions in our class, and we're supposed to write a function that displays a four-choice menu (with four character choices and a description of that choice). Then, it is supposed to output that character as a lower-case letter. If the character they enter isn't one of the choices, it is supposed to re-ask the user two more times. If two more incorrect characters are entered, a "!" should appear. The format we're supposed to follow is:
char get_users_choice_from_four_choice_menu(char choice1, string description1,
char choice2, string description2,
char choice3, string description3,
char choice4, string description4);

I'm not sure how to write a function that does this. Can anybody help?

Try what you are sure of, and attempt what you can't. Then post what you tried and we can help you fix it if you have problems.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.