Source Code File 06-08_text6
06-08_text6.c
#include <ncurses.h>
int main()
{
initscr();
/* add five lines */
addstr("This is the first line\n");
addstr("Line two here\n");
addstr("The third line\n");
addstr("Fourth line here\n");
addstr("And the fifth line\n");
refresh();
getch();
/* remove a line*/
move(2,0);
deleteln();
refresh();
getch();
endwin();
return 0;
}
Output Screenshot

(Click image to update.)
Notes
* If you just wanted to clear the line, use the clrtoeol() function.
Copyright © 1997-2025 by QPBC.
All rights reserved
