I have been learning to use the ncurses library and I have come across getstr(). I was wondering how you would erase the text from getstr() on the terminal after the value has already been stored in a variable? I have tried to find the answer on google but no luck!
Basically I want it so when the user presses enter the text will be removed from the screen.
As far as I know, ncurses has two functions,
gotoxy()andgetxy(), which let you jump to every position of the screen and tell you where you are located right know.Jump to the front of the previous line and call
clrtobot()to erase everything after the cursor.Edit:
Since you said that clearing the entire window is an option, you can just call
clear()(also part of the ncurses library).