Hi,
I was wondering if there is a clear screen function when using InterDev to compile and run my C code ?
im used to using an old borland compiler which had clrscr()
anything resembling that in interdev?
Cheers,
Kev
Hi,
I was wondering if there is a clear screen function when using InterDev to compile and run my C code ?
im used to using an old borland compiler which had clrscr()
anything resembling that in interdev?
Cheers,
Kev
thanks
but i have to do it in C not C++
Cheers,
Kev
Read the FAQ then you wouldnt have to ask pointless questions.
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
oooh look another friendly forum....
If you check, you'll find this is a friendly forum. If you search the boards, you'll also find that question is probably the most asked question, the answers have been given many times, and are in the FAQ, which is what the FAQ is for.
This is the internet, wherever you go, a dumb or unresearched question is likely to get either flames or misleading replies, if any at all. I'm afraid you going to have to live with that, 'cos that's the way it is.
The section of the FAQ dealing with this topic can be found here.
Thread closed.
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.
What you got to do is this:
Include the header file <stdlib.h>
This is for dos commands.
The dos command for 'clear screen' is 'cls'
Here is an example of how to use it:
It is as simple as that.PHP Code:
include <iostream.h>
include <stdlib.h>
int main()
{
cout<< " Hello world ";
system("PAUSE"); // remember to include the system command
// Pause is the Command that says ' press any key to continue..'
system("cls"); // clears screen
cout<< "This is a new screen";
system("PAUSE"); // Pauses for user's reaction
return 0;
}
"All things come to an end"
please never recommend the system() function. You should probably forget that it even exists as there is always a better way of doing what that accomplishes. Read the faq.
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
Oooh, looks like I forgot to close it!
SC is right, read the FAQ, there is always a better way to do something than system().
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.