There's a couple ways to do this...
First, you can make a FLUSH macro to flush the input buffer...
Code:
#define FLUSH for (;getchar() != '\n';)
// ... Somewhere in the file, we want to get input...
printf ("Gimme Input.\n");
scanf ("%c", &myChar);
FLUSH;
// Now myChar has the first letter, and everything else that was
// in the buffer has been trashed by FLUSH
Second, you can just grab the string with gets() and process that string...
Code:
char tempInput[80];
printf ("Gimme Input.\n");
gets (tempInput);
sscanf (tempInput, "%c", &myChar);
Incidentally, even though gets will generally work, provided your array is large, it is much safer to use fgets().
Finally, there's the conversion specifiers. I'm not too sure about this one, but I think this will do the trick...
Code:
printf (Gimme Input.\n");
scanf ("%c%*[^'\n']%*c", &myChar);
That format string basically says this....
%c get a character
%*[^'\n'] get the longest string possible that does not contain the character '\n'. The * specifies that we don't want to store this string.
%*c get the next character (which is obviously the '\n'). The * specifies that we don't want to store thsi character.
I haven't tested any of these code segments, but I'm pretty sure they're working. I suggest choosing whatever method makes the most sense to you.