/* * Another example using ncurses library. */ #include #include #include int main(void) { char* msg = "Hello!"; int row, col; initscr(); getmaxyx(stdscr, row, col); move(row/2, (col-strlen(msg))/2); printw("%s", msg); move(row-2, 0); printw("screen has %d rows and %d columns (press any key to exit)\n", row, col); refresh(); getch(); endwin(); return EXIT_SUCCESS; }