I'm writing a simple C hangman game, which is my first acquaintance with graphics in C.
In the main function I've put a window menu, using "newwin", "mvwprintw" and "wrefresh". From this menu I'm calling another function for New Game, using new window for it.
I want to have a Quit option from New Game window when Q is pressed, which is leading back to the Menu window.
I've tried with "endwin" for new game window, which doesn't exit the program, but closes the exe and the process should be stopped from the terminal.
How can I close a window and move to another, without deleting the first one?