I am writing a hangman game program for class which outputs to the windows command prompt. I would like to have the top half or third of the command prompt display the game information such as "# of guesses wrong", "letters guessed incorrectly", the disguised word itself and the person being hanged. If someone could point me in the right direction that would be appreciated.
//gotoxy using windows.h
void gotoxy (int x, int y) {
COORD coord; // coordinates
coord.X = x; // X and Y coordinates
coord.Y = y;
// moves to the coordinates
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
Before reading this i came up with a possible solution: could i use a clear screen command at the top of my while loop (before the initial output, after the resulting iteration and substitution of characters) to create the illusion of a static display?