How would I go about clearing the console window of my app without just looping and filling the whole screen with spaces? :D
:confused:
Printable View
How would I go about clearing the console window of my app without just looping and filling the whole screen with spaces? :D
:confused:
I believe :
will workPHP Code:#include <iostream>
using namespace std;
int main()
{
system("cls");
return 0;
}
:)
Thanks, that worked. :)
BTW, how did you make the code say "PHP"?
Is there a way to make it C\C++ or VB?
For the little I use them, I do C/C++ code in [ PHP ][ /PHP ] tags (without the spaces) and for VB code in the [ vbcode ][ /vbcode ] tags (without the spaces)
:)
If you are using borland, they have a function called clrscr(), which will clear the screen.
Note that this function is not part of the ANSI standard.
I used system("cls") since I try to stick to the ANSI standard.
BTW, isn't this command system-dependent?
Yes.