How to make a app like nano or vim in which the whole terminal is used

When i make my terminal apps i don't like it when all the stuff that i ran in my terminal appears at the top while i'm in my program even when i clear the terminal screen cause of that little space at the top that i used to run the program from cl, how would i be able to make my terminal app take up the whole terminal and when i exit it goes back to the original screen like in vim or nano in which when i type CTRL+X or :q that it goes back to the original terminal like it didnt change how wil i be able to achieve this?
Have a look at the ncurses library.
there is also termbox which is minimalistic and easy to use.
Topic archived. No new replies allowed.