online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> #include <unistd.h> #include <sys/poll.h> #include <termios.h> void set_term_quiet_input() { struct termios tc; tcgetattr(0, &tc); tc.c_lflag &= ~(ICANON | ECHO); tc.c_cc[VMIN] = 0; tc.c_cc[VTIME] = 0; tcsetattr(0, TCSANOW, &tc); } int main() { struct pollfd pfd = { .fd = 0, .events = POLLIN }; set_term_quiet_input(); while (1) { if (poll(&pfd, 1, 0)>0) { int c = getchar(); printf("Key pressed: %c \n", c); if (c=='q') break; } usleep(1000); } }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue