How can I change the width of a Windows console window?

前端 未结 11 2234
一向
一向 2020-12-05 07:06

Is it possible to programmatically, or otherwise, increase the width of the Windows console window? Or do I need to create a wrapper program that looks and acts like the con

11条回答
  •  臣服心动
    2020-12-05 07:36

    system("mode 45, 20");
    

    This is a bad solution because it disables vertical scrolling.

    This is better:

    system("mode CON: COLS=120");
    

提交回复
热议问题