Can we fix the terminal(console) size according to data displayed?
I am working in c++,and my O.S is kubuntu.Using c++ i can align the data displayed in cosole,
but before i want to change the terminal to a particular size.otherwise it is not aligned the data.
Any way to change the size of terminal according to the data dispalyed? If anybody knows about this .please reply me soon..

10 Years
Discussion Span
Last Post by Narue

Instead of attempting to change the size of the terminal (not sure that is even possible) figure out how to align the data correctly. That will probably require knowledge of and use of terminfo information because every terminal may be different.


thanks for ur reply,
i just wrote a prgram in c++ that will aligh the output.ie In one line only 80 characters were displayed.If it exceeds ,next character will start from next line.Also words cannot broken in middle.But if the terminal is minimize or small(default) then it will not alighn data accordingly.So any way to adjust this terminal or anyway to keep the terminal size big?

i expect ur reply soon


>So any way to adjust this terminal or anyway to keep the terminal size big?
That's poor design. Your program's output should conform to the environment, not the other way around. There are ways to find out the size of the console, and you can use those rather than hard coding a size or trying to force a size on the user.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.