cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Can we delete a line in cosole windown?
Can we delete a line in cosole windown?
Jun 5, 2009 at 5:10pm UTC
nhimxivn
(4)
I'm newbie, so there are manything i don't known.
To clean screen we can use:
clrscr(); // In Borland C
system("cls"); // With Visual C++
To delete a current line in Borland C, we can use:
delline();
So how to delete a line in VC++?
Thanks for ur help!
Jun 5, 2009 at 6:09pm UTC
Duthomhas
(13212)
Take a stroll through the Windows Console Functions
http://www.google.com/search?btnI=1&q=msdn+console+functions
I haven't looked, but I suspect that you will have to copy everything below the line in the console screen buffer up one line, and blank the bottom line.
See
http://www.cplusplus.com/forum/articles/10515/page1.html#msg49080
for an example of playing with the console buffer. (Sorry, this just clears it, but its the best example I can give you ATM. Perhaps someone will have a better one.)
Good luck!
[edit]
BTW, that's all Windows-specific. If you want to do fullscreen console stuff, check out the
Curses
library:
http://pdcurses.sourceforge.net/
http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/
Last edited on
Jun 5, 2009 at 6:11pm UTC
Topic archived. No new replies allowed.