online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> #include <stdlib.h> #include <ncurses.h> #include <unistd.h> // For sleep function int main() { initscr(); // Initialize ncurses printf("Press 'q' to exit...\n"); sleep(2); clear(); refresh(); cbreak(); // Enable 'cbreak' mode, which doesn't wait for Enter key noecho(); // Disable echoing of typed characters nodelay(stdscr, TRUE); // Set getch() to be non-blocking for (;;) { int ch = getch(); // Read a single character without blocking if (ch == 'q') { printf("Exiting...\n"); sleep(2); break; } printf("Message every 1 second...\n"); refresh(); // Refresh the ncurses screen sleep(1); // Wait for 1 second } endwin(); // End ncurses return 0; }

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