cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Line clearing
Line clearing
Aug 31, 2008 at 4:42pm UTC
hypercube1
(66)
i recently wrote a fight program in which you hit 1 to attack 0 to defend and i was wondering if there is a way to clear the line after it is displayed?
Aug 31, 2008 at 6:44pm UTC
jmc
(137)
Set the coordinates of your cursor from new:
http://msdn.microsoft.com/en-us/library/ms686025(VS.85).aspx
and write a line full of white spaces.
Aug 31, 2008 at 8:04pm UTC
helios
(17607)
You can also print a bunch of '\b', but if you printed a newline, it won't work.
Aug 31, 2008 at 8:47pm UTC
noahclark
(4)
i am just a noob to all this, but wouldn't putting a:
system("cls");
after the [probably, maybe] cin>> statement work....?
Aug 31, 2008 at 9:50pm UTC
Zhuge
(4664)
i am just a noob to all this, but wouldn't putting a:
system("cls");
after the [probably, maybe] cin>> statement work....?
If you are running a Windows computer and your anti-virus software does not complain, that would clear the whole screen.
Look five messages down here:
http://www.cplusplus.com/forum/beginner/3304/
Topic archived. No new replies allowed.