Function similar to \r

I know that \r returns cursor to the start of line. what if i have printed 10 lines with use of \n or endl and i want to goto very first line to renew my print?
the only way to do that is to perform terminal and os specific stuff, some sort of gotoxy()
Topic archived. No new replies allowed.