nc1.c (503B)
1 #include <ncurses.h> 2 3 int main(){ 4 initscr(); // Creates stdscr (Standard screen). "constructor" 5 raw(); // Does NOT let you exit program with Ctrl-C. use cbreak for exit functionality 6 printw("Hello world!"); // Works pretty much as printf() 7 getch(); // Waits for user to enter character (works as a pause) 8 endwin(); // Frees the memory in the screen and closes ncurses. "destructor" 9 10 return 0; 11 }