Re: Way OT: C++ function to clear screen
On Wed, 7 Jun 2000, Cameron Matheson wrote:
>
> I'm sorry even to mail the Debian list about this, but I can't find this
> information anywhere. I'm wondering what a function would be in C++
> that I could use to clear the screen at the beginning of the program
> (this is just a console program). Sorry to bother you.
Cameron
Someone said "apropos clear". Here is how to make use of this BASH
command from within C++. I hope this is useful to you and isn't
beating the dead horse.
#include <cstdlib>
int main(){ system("clear"); }
ought to do it. If your compiler doesn't like cstdlib, use stdlib.h
instead.
--David
David Teague, dbt@cs.wcu.edu
Debian GNU/Linux Because software support is free, timely,
useful, technically accurate, and friendly.
(I hope this is all of the above.)
Reply to: