I'm using Emacs and gdb to debug a c++ program that uses conio
's getch
. Something like the following:
#include <conio.h>
int main(){
int c = getch();
cout << (char) c;
}
If I place a breakpoint in the first line of the main
, gdb
hangs and nothing happens. I don't think a input file (run < input.txt
) would work.
How should I debug it?