clear terminal screen on ubuntu?

how can i do so without using system("cls") or system("clear")?
are those the only ways? honestly i read them i and i not like the standard way, it's not really clearing the screen, it's just putting newline characters, which seems inefficient and just hiding the problem.

i also do not like the ncurses or conio.h solutions neither, they seem every problematic.

i've read the final OS specific solution for ubuntu but i do not really understand it. for example, he didn't explain what setupterm() does and what parameters it takes or putp() and tigetstr().
if i copy the code it will probably work but im a noob and i want to learn what those functions does and more about term.h rather than copy code. i've searched on the internet but have not found anything really helpful about them.

maybe someone could explain to me what they do? or if you have a better way to clear the terminal screen on linux please post here

First off, you probably shouldn't be clearing the screen for what you are doing...

Secondly, there is not any better way to clear the screen on Linux. The purpose of the code wasn't to teach you years and books worth of information. It was to show you how to do it correctly.

If you want to know more about specific functions, type "man putp" or "man tigetstr" into Google.

Your complaints are a result of misunderstanding the problem domain, not the solutions.
Here is some further reading to help:
http://www.cplusplus.com/forum/beginner/1988/page2.html#msg10636
http://www.cplusplus.com/forum/beginner/1988/page4.html#msg14423

Hope this helps.
Topic archived. No new replies allowed.