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
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.