简体   繁体   English

C语言中调整输出终端的大小

[英]Resizing output Terminal in C Language

would like to get some help on ac project i am currently working on.想在我目前从事的 ac 项目上获得一些帮助。 I have a string/array of output to the terminal, but somehow the standard terminal is too small for my output.我有一个输出到终端的字符串/数组,但不知何故标准终端对于我的输出来说太小了。 Even after i manually expand the window of the console the output is still cut off, instead of printing in a single line, it just gets cut off and go to the next row automatically.即使在我手动扩展控制台的窗口后,输出仍然被切断,而不是在一行中打印,它只是被切断并自动转到下一行。

hope to get help.希望得到帮助。

I think that the only way to correct this is by splitting your one-line output in multiple lines, using "\\n" at the end of every line.我认为纠正这个问题的唯一方法是将单行输出分成多行,在每一行的末尾使用“\\n”。

By doing this you can control when and where it has to write in the next line, and you can make it look more like you wanted to.通过这样做,您可以控制它必须在下一行写入的时间和位置,并且可以使它看起来更像您想要的那样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM