How do I clear the first two lines of the screen by using the curses library? I see that there is a deleteln()
command, however it only clears the line under the cursor.
Also, a second question, does the command clear()
clear the whole screen?
deleteln()
deletes the line and moves the rest of the text up. clrtoeol()
clears to the end of the current line.
You need to use int move(int y, int x)
to position the cursor at the start of each of the 2 top lines and then call clrtoeol()
.
clear()
clears the whole window