I am currently using the MoveWindow() function in the header Windows.h, and using this function, I can move and resize the output console window any way I want.
MoveWindow(GetConsoleWindow(), x, y, width, height, TRUE);
// x and y is the position of the topleft corner of window
However, I cannot figure out how to center the screen without hard-coding the position of the window. Is there a way to set the position of the window to change depending on the width and height that I set? Thanks!
P.S. I am pretty new to C++