You can do it, but the simplest way makes it so that your program can only run on Windows, which may or may not matter. If it does matter, then skip all of this.
#include <windows.h>
at the top of your program. Then add these two functions to your program:
Code:
void MaximizeOutputWindow(void)
{
HWND consoleWindow = GetConsoleWindow(); // This gets the value Windows uses to identify your output window
ShowWindow(consoleWindow, SW_MAXIMIZE); // this mimics clicking on its' maximize button
}
void RestoreOutputWindow(void)
{
HWND consoleWindow = GetConsoleWindow(); // Same as above
ShowWindow(consoleWindow, SW_RESTORE); // this mimics clicking on its' maximize for a second time, which puts it back to normal
}
Then call the Maximize function at the start of main, and the Restore function at the end .
If you need your program to work on Linux or Mac too, google for 'ncurses' which probably has equivalent functionality.