| | |
Terminal size
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2007
Posts: 2
Reputation:
Solved Threads: 0
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..
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..
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.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
•
•
Join Date: Sep 2007
Posts: 2
Reputation:
Solved Threads: 0
hai,
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
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
You can use curses library to get standard format (I think). It's been many years since I programmed for *nix so I probably won't be much more help.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
>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.
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.
I'm here to prove you wrong.
![]() |
Similar Threads
- gnome window size (Window and Desktop Managers)
- Change Web Page Font Size on the Fly (Windows tips 'n' tweaks)
- Any advice about folder size viewer (Windows NT / 2000 / XP)
- Some help needed with Selection Sort in java, Please!! (Java)
- BitchX + Terminal issue (Mac Software)
- Cannot install samba (*nix Software)
- can't find file size over 3 megabytes to clean up harddrive (Windows NT / 2000 / XP)
- Where do you most of your work? (*nix Software)
Other Threads in the C++ Forum
- Previous Thread: assigning a TCHAR char array to std::string
- Next Thread: Member Operators and Automatic type Conversions
| Thread Tools | Search this Thread |
Tag cloud for C++
6 api array arrays based beginner binary bmp c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete deploy desktop directshow dll download dynamic encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int java lib library linkedlist linker list loop looping loops map math matrix memory microsoft newbie news number output pointer problem program programming project python random read recursion recursive reference simple string strings studio system temperature template templates test text text-file tree unix url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






