Can this be done?

I want a count down sort of program, but instead of counting the number and outputting it one by one in new lines or in rows, how can I have the screen refresh and output the numbers counting in the same spot?
dont tell anyone i told you this but (*looks side to side*) system("cls") should clear the console for you. but Ive got to go before the system naysayers get to me. bye
system("cls") is the only way to do it in a console app other than just outputting a bunch of blank characters, but i think that would look kind of amateurish
Why don't you have a seat right over there, bboy212... *points out an electric chair* ;)

Here is an article full of ways to clear the screen. Specifically, here's a link to a post which is full of (admittedly OS-specific ways) to clear the console that theoretically shouldn't require you to install any further libraries.
http://www.cplusplus.com/forum/articles/10515/#msg49080

Yep. I'll risk it. :/

-Albatross
Last edited on
Tip 1: system("cls") is neither the only nor the best way to do this.
conio.h could be used, however it is very system dependent and there do exist several
versions of this header. The only real reason to use it is that you might already have it and are to lazy too get ncurses, which is a platform independent (well, within limits of course) library that provides similar functions (and more, actually). Con is, you can't use many standard io functions together with it.
Tip 2: spoon licker, you may disagree but I can't think of someone who has previously trolled and now starts opening quite a number of completely unrelated threads in a relatively short amount of time again as something else than a troll.
Last edited on
Sorry. Take it up with Duoas if you think there's a simpler solution that doesn't use system().

By the way, didn't you already claim to do a little bit of Windows programming which is a lot more complex than that in another thread?

-Albatross
Yeah, but I'm weird like that....I can learn some very confusing things and fail to understand the simplest of tasks. :(
@Albatross....You live in the snow. Three times....
spoon licker wrote:
@Albatross....You live in the snow. Three times....

confusion reigns....
LOL sorry...Jus joking.

Any ways, ultifiinitus, if you don't mind, could you help me on my latest post?

PS: The one about game engines, and sorry for asking for help I know I'm supposed to but no one else helped me. :(
Last edited on
Topic archived. No new replies allowed.