Cant seem to find it anywhere.
How do I simply clear one line or everything?
An example...
If I want to make a count down.
Instead of doing:
"10 9 8 7"...
It would be:
"10", then clear it out, "9", then clear it out again, "8"...
Thanks
Cant seem to find it anywhere.
How do I simply clear one line or everything?
An example...
If I want to make a count down.
Instead of doing:
"10 9 8 7"...
It would be:
"10", then clear it out, "9", then clear it out again, "8"...
Thanks
You can use the backspace escape sequence ( \b ), but you'd have to implement some sort of time to have the number stay on the screen for a certain length of time.
If you want a non-standard solution, you can try conio.h and it's gotoxy() function, and I'm sure windows.h has something, as well.
Sent from my iPadŽ
well one way is for the count down to be the only output on the screen until it is done. You could simply clear the screen before each number showed up. one way to do it is the
It is a relativly slow process but it works and is very easy to implement into a program. but if you wanted all other line of text to show and only the number to dissapear. I couldnt help you there. I am relativly new to programming so I only know some functions. Hopefully this helped.Code:system ("cls");
please don't use system("cls"); it opens your program up to a security flaw.
use the backspace character ('\b') with some of the timing functions from <ctime> to get yourself a nice looking countdown. this isn't the best way, but it's the most standard AFAIK.
Join is in our Unofficial Cprog IRC channel
Server: irc.phoenixradio.org
Channel: #Tech
Team Cprog Folding@Home: Team #43476
Download it Here
Detailed Stats Here
More Detailed Stats
52 Members so far, are YOU a member?
Current team score: 1223226 (ranked 374 of 45152)
The CBoard team is doing better than 99.16% of the other teams
Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)
Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT