|
-
April 11th, 2004, 10:43 AM
#1
How do you clear the screen on C++?
Hi, how do you clear the screen on C++? on VB you used cls to clear the screen, but I don't know what function to use thanks for the help.
-
April 13th, 2004, 03:22 AM
#2
Have a look at http://msdn.microsoft.com/library/de...the_screen.asp
Techniques are a bit naff. Alternatively, if you have ansi.sys loaded, just print
"\033[2J"
Succinct is verbose for terse
-
April 14th, 2004, 01:51 PM
#3
You can try
#include <conio.h>
and
call the function
clrscr();
-
April 14th, 2004, 01:57 PM
#4
Re: How do you clear the screen on C++?
Originally posted by beginner_c++
Hi, how do you clear the screen on C++? on VB you used cls to clear the screen, but I don't know what function to use thanks for the help.
First, there is no function in standard C++ to clear the screen.
There may be functions that are specific to your operating system that clear the screen. Again, it all depends on the OS that you are running (and compiler brand counts also -- one compiler may call the function cls(), while another may call it clrscr(), while another may call it ClearTheScreen()).
Regards,
Paul McKenzie
Last edited by Paul McKenzie; April 14th, 2004 at 01:59 PM.
-
April 14th, 2004, 01:58 PM
#5
Originally posted by vcstarter
You can try
#include <conio.h>
and
call the function
clrscr();
If the OP is running anything other than Visual C++, this may not even compile, let alone run.
Regards,
Paul McKenzie
-
April 14th, 2004, 02:03 PM
#6
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|