Hey
I have this code:
void menu()
{
char opt
do
{
system ("cls");
printf ("1 - Option 1");
printf ("2 - Option 2");
printf ("3 - Option 3");
[B]scanf ("%c",&opt);[/B]
[B]}while ((opt!="1") && (opt!="2") && (opt!="3"));[/B]
The lines in bold are the ones Im not sure about.
What I want to do is a menu that displays, the cursor blinks, and I have to press a key (In this case 1, 2 or 3) and as soon as I press it, it enters the option (by using a case which I understand for now). If incorrect it simply displays the menu again. I just want to hit one key and not enter the option then have to hit the enter key.