Quantcast
Channel: noob help with switch/case
Viewing all articles
Browse latest Browse all 11

noob help with switch/case

$
0
0
Yes, you'll get both for each entry.  The problem is that scanf() uses buffered input.  You have to press the A key, then the Enter key.  You see both in your loop, the Enter key runs the default case.  Use <conio.h>:

        keys = _getch();


Hans Passant.

Viewing all articles
Browse latest Browse all 11

Latest Images

Trending Articles





Latest Images