Copyright: please indicate the source! https://blog.csdn.net/ZouHuiDong/article/details/89812472
Control Console window size
following code:
system("mode con cols=30 lines=20");
Or use variables:
char chCmd[32];
sprintf(chCmd,"mode con cols=%d lines=%d",height,width);
system(stCmd);