---------- Forwarded message ----------
Date: Fri, 9 Jun 2000 08:59:56 -0400 (EDT)
From: David Teague <[EMAIL PROTECTED]>
To: Cameron Matheson <[EMAIL PROTECTED]>
Cc: debian-user@lists.debian.org
Subject: Re: Way OT: C++ function to clear screen
Resent-From: debian-user@lists.debian.org

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, [EMAIL PROTECTED]
Debian GNU/Linux Because software support is free, timely,

                 useful, technically accurate, and friendly.
                 (I hope this is all of the above.)

Wouldn't a function in a curses library do this, If the terminal
type is known you could output (for instance) the raw vt string for
clearing the screen, I have seen this done but it might not be
universal like a curses function.  
   



-- 
Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED] < /dev/null


Reply via email to