There's many way to read input.
stdio.h would have most of them
scanf
fscanf
fgetc
getc
Here's a list with references
cstdio (stdio.h) - C++ Reference
Then all you need to do is compare the input with the ASCII of each letter
If it matches the letter you want, have it beep, if not skip
Embed this all in a loop and you're set.