C语言如何控制控制台窗口大小

版权声明:转载请注明出处! https://blog.csdn.net/ZouHuiDong/article/details/89812472

控制控制台窗口大小
如下代码:

system("mode con cols=30 lines=20");

或者使用变量:

char chCmd[32];
sprintf(chCmd,"mode con cols=%d lines=%d",height,width);
system(stCmd);

猜你喜欢

转载自blog.csdn.net/ZouHuiDong/article/details/89812472