CompuServe Messages

HELP !!

    19-Jul-90 11:55:03
Sb: HELP !!
Fm: Henry Williams 76416,377
To: all
Arrgh! HELP!! Save me from this creeping insanity PLEASE!!! What I'm trying to do is have my program take a character from the keyboard, and put it through a 'switch' routine. So here are my problems… 1) My C programming stinks! 2) For reasons unknown the program goes right past any scanf, getchar, or gets functions I put in. (One purpose for this is that I want to stop the scroll so someone can read a page and then hit return to go to the next.) 3) I have tried `cases:' with single characters, integers, and strings, but the program ALWAYS goes to the default: option passing my scanf like it isn't there. Can I use anything other than single character 'a' cases? I'm using a Manx 3.6a compiler. I'll show you what I've done so you can be sure that I at least put it down right. Thanks. I'll put you in my will if you save me from leaving C to learn to play the piano. some function() { char input; printf ("Print some letter"); scanf ("%c", &input); switch ( input ) { case 'e': variable = this; break; case 'w': variable = that; break; case "ne": /* <– just want to know if this is legal? */ function (); break; default: /* this is the case that always gets chosen. */ break; } } Thanks for your time, regards Henry.