- Code: Select all
#include <iostream>
#include <windows.h>
int main()
{
HWND console = GetConsoleWindow();
RECT r;
GetWindowRect(console, &r);
MoveWindow(console, r.left, r.top, 1024, 768, true);
for (int i = 0; i < 65; i++)
{
std::cout<< i;
}
std::cout<< "\n";
for (int i = 1; i < 58; i++)
{
std::cout<< i << "\n";
}
Sleep(5000);
system("cls");
MoveWindow(console, r.left, r.top, r.right - r.left, r.bottom - r.top, true);
for (int i = 0; i < 44; i++)
{
std::cout<< i;
}
std::cout<< "\n";
for (int i = 1; i < 24; i++)
{
std::cout<< i << "\n";
}
}
if it doesn't get bigger than you would have to right click on the top of the command prompt window and click on properties and click on the layout tab and change the screen buffer size to something like 200 x 100. give me some replies if it worked for you without having to change your settings or if you had to
thanks
