Instead of it always printing on a new line, I want to overwrite the old one.
so that it doens't scroll and I can make a good console gui. that way i can output numbers in a single location.
If you just want to overwrite the current line, or the last few chars, you can use \r (move the cursor back to the start of the line) and \b (tab one space back). You will have to remember to overwrite chars with blanks when necessary.
It does flicker a bit if you changes too much text, but it's often used for console spinners and such like.
And while I'm not sure it's fully portable, it works on Windows and -- I believe -- most Linuses.