Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Clear Screen?

Reply
Thread Tools

Clear Screen?

 
 
Tim Mierzejewski
Guest
Posts: n/a
 
      06-27-2003
How do I clear the text from my screen, other than a bunch of \n's or
endl's?

Tim M.


 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      06-27-2003
"Tim Mierzejewski" <(E-Mail Removed)> wrote...
> How do I clear the text from my screen, other than a bunch of \n's or
> endl's?


Please read FAQ 15.20. You can find FAQ
here: http://www.parashift.com/c++-faq-lite/

Victor


 
Reply With Quote
 
 
 
 
Unforgiven
Guest
Posts: n/a
 
      06-27-2003
Tim Mierzejewski wrote:
> How do I clear the text from my screen, other than a bunch of \n's or
> endl's?


C++ can not clear the screen, as indicated in the FAQ Victor pointed you to.
However, you can ask the OS to do it for you. The most common ways to do
this are 'system("cls");' in Windows and system("clear");' in Linux. The
system function is defined in <process.h>

--
Unforgiven

"Not only do I not know the answer
I don't even know what the question is"
My world - Metallica

 
Reply With Quote
 
Ashish
Guest
Posts: n/a
 
      06-27-2003

"Unforgiven" <(E-Mail Removed)> wrote in message
news:bdhs8i$t2rsj$(E-Mail Removed)...
> Tim Mierzejewski wrote:
> > How do I clear the text from my screen, other than a bunch of \n's or
> > endl's?

>
> C++ can not clear the screen, as indicated in the FAQ Victor pointed you

to.

Huh? C++ can do a lot of things using the OS specific libraries. Dont say
C++ cannot clear the screen. Instead, you should say standard C++ cannot
clear the screen.


> However, you can ask the OS to do it for you. The most common ways to do
> this are 'system("cls");' in Windows and system("clear");' in Linux. The
> system function is defined in <process.h>
>
> --
> Unforgiven
>
> "Not only do I not know the answer
> I don't even know what the question is"
> My world - Metallica
>



--
-Ashish
--------------------------------------------------------------------------
Hi! I'm a shareware signature! Send $5 if you use me, send $10 for manual!
http://www.123ashish.com http://www.softwarefreaks.com


 
Reply With Quote
 
Victor Bazarov
Guest
Posts: n/a
 
      06-27-2003
"Ashish" <(E-Mail Removed)> wrote...
>
> "Unforgiven" <(E-Mail Removed)> wrote in message
> news:bdhs8i$t2rsj$(E-Mail Removed)...
> > Tim Mierzejewski wrote:
> > > How do I clear the text from my screen, other than a bunch of \n's or
> > > endl's?

> >
> > C++ can not clear the screen, as indicated in the FAQ Victor pointed you

> to.
>
> Huh? C++ can do a lot of things using the OS specific libraries. Dont say
> C++ cannot clear the screen. Instead, you should say standard C++ cannot
> clear the screen.


That's the only C++ we speak of here.


 
Reply With Quote
 
Victor Bazarov
Guest
Posts: n/a
 
      06-27-2003
"Ashish" <(E-Mail Removed)> wrote...
>
> "Victor Bazarov" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > "Ashish" <(E-Mail Removed)> wrote...
> > >
> > > "Unforgiven" <(E-Mail Removed)> wrote in message
> > > news:bdhs8i$t2rsj$(E-Mail Removed)...
> > > > Tim Mierzejewski wrote:
> > > > > How do I clear the text from my screen, other than a bunch of \n's

> or
> > > > > endl's?
> > > >
> > > > C++ can not clear the screen, as indicated in the FAQ Victor pointed

> you
> > > to.
> > >
> > > Huh? C++ can do a lot of things using the OS specific libraries. Dont

> say
> > > C++ cannot clear the screen. Instead, you should say standard C++

cannot
> > > clear the screen.

> >
> > That's the only C++ we speak of here.
> >
> >

>
> Thats what I said too... but dont misguide the OP by saying that C++

cannot

Misguide?

> do this, or can do that. Guide him to an appropriate newsgroup. I am sure
> you understand that.


But in all honesty, C++ cannot clear the screen. It's some OS-
specific library call that does that. Or sequence of characters
output to console or ... But it is not a language thing. And,
by the way, while there exist extensions to the language created
by some eager compiler vendors, there is only one C++ -- Standard.

That's what we mean when we say "C++ cannot do that". Another
example: can C++ read files? Yes. Can C++ read JPEG files? Yes.
Can C++ read and display JPEG files? NO. Displaying them is not
a language feature. C++ cannot do that. Not standard, not any
other C++. The same with clearing the screen.

Guiding others to a particular newsgroup is a voluntary thing. If
you stop me in the street and ask whether I could give you a lift
to a town a thousand kilometres away, I'll probably say "No, sorry,
I cannot do that", but I am not obligated to explain to you all
possible options you have or direct you to a bus station. It is
up to you to figure that out. (Of course it might be mighty kind
of me to point you to a bus stop, and I _probably_ would do that
if I knew where you were going -- The OP just asked whether there
was a way to clear the screen except outputting newline characters,
and there isn't). See the point?

Anyway...

Victor


 
Reply With Quote
 
Ashish
Guest
Posts: n/a
 
      06-27-2003

"Victor Bazarov" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Ashish" <(E-Mail Removed)> wrote...
> >
> > "Victor Bazarov" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > "Ashish" <(E-Mail Removed)> wrote...
> > > >
> > > > "Unforgiven" <(E-Mail Removed)> wrote in message
> > > > news:bdhs8i$t2rsj$(E-Mail Removed)...
> > > > > Tim Mierzejewski wrote:
> > > > > > How do I clear the text from my screen, other than a bunch of

\n's
> > or
> > > > > > endl's?
> > > > >
> > > > > C++ can not clear the screen, as indicated in the FAQ Victor

pointed
> > you
> > > > to.
> > > >
> > > > Huh? C++ can do a lot of things using the OS specific libraries.

Dont
> > say
> > > > C++ cannot clear the screen. Instead, you should say standard C++

> cannot
> > > > clear the screen.
> > >
> > > That's the only C++ we speak of here.
> > >
> > >

> >
> > Thats what I said too... but dont misguide the OP by saying that C++

> cannot
>
> Misguide?
>
> > do this, or can do that. Guide him to an appropriate newsgroup. I am

sure
> > you understand that.

>
> But in all honesty, C++ cannot clear the screen. It's some OS-
> specific library call that does that. Or sequence of characters
> output to console or ... But it is not a language thing. And,
> by the way, while there exist extensions to the language created
> by some eager compiler vendors, there is only one C++ -- Standard.
>
> That's what we mean when we say "C++ cannot do that". Another
> example: can C++ read files? Yes. Can C++ read JPEG files? Yes.
> Can C++ read and display JPEG files? NO. Displaying them is not
> a language feature. C++ cannot do that. Not standard, not any
> other C++. The same with clearing the screen.
>
> Guiding others to a particular newsgroup is a voluntary thing. If
> you stop me in the street and ask whether I could give you a lift
> to a town a thousand kilometres away, I'll probably say "No, sorry,
> I cannot do that", but I am not obligated to explain to you all
> possible options you have or direct you to a bus station. It is
> up to you to figure that out. (Of course it might be mighty kind
> of me to point you to a bus stop, and I _probably_ would do that
> if I knew where you were going -- The OP just asked whether there
> was a way to clear the screen except outputting newline characters,
> and there isn't). See the point?
>
> Anyway...
>
> Victor
>
>


I agree with you. But if you tell me that you cannot give me a lift to a
thown a thousand kilometers away doesnt mean that you should tell me that
there is no way I can go to that town. Thats what the other person did. He
said that C++ cannot... I am not saying that he or you HAVE to guide the OP
to an appropriate newsgroup, its voluntary ofcourse, but dont MISguide him
saying that it cannot be done. Get it?


--
-Ashish
--------------------------------------------------------------------------
Hi! I'm a shareware signature! Send $5 if you use me, send $10 for manual!
http://www.123ashish.com http://www.softwarefreaks.com


 
Reply With Quote
 
Ashish
Guest
Posts: n/a
 
      06-27-2003

"Victor Bazarov" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Ashish" <(E-Mail Removed)> wrote...
> >
> > "Victor Bazarov" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > "Ashish" <(E-Mail Removed)> wrote...
> > > >
> > > > "Unforgiven" <(E-Mail Removed)> wrote in message
> > > > news:bdhs8i$t2rsj$(E-Mail Removed)...
> > > > > Tim Mierzejewski wrote:
> > > > > > How do I clear the text from my screen, other than a bunch of

\n's
> > or
> > > > > > endl's?
> > > > >
> > > > > C++ can not clear the screen, as indicated in the FAQ Victor

pointed
> > you
> > > > to.
> > > >
> > > > Huh? C++ can do a lot of things using the OS specific libraries.

Dont
> > say
> > > > C++ cannot clear the screen. Instead, you should say standard C++

> cannot
> > > > clear the screen.
> > >
> > > That's the only C++ we speak of here.
> > >
> > >

> >
> > Thats what I said too... but dont misguide the OP by saying that C++

> cannot
>
> Misguide?
>
> > do this, or can do that. Guide him to an appropriate newsgroup. I am

sure
> > you understand that.

>
> But in all honesty, C++ cannot clear the screen. It's some OS-
> specific library call that does that. Or sequence of characters


And those OS-specific libraries cannot be used using C++. I get it now.



 
Reply With Quote
 
Victor Bazarov
Guest
Posts: n/a
 
      06-27-2003
"Ashish" <(E-Mail Removed)> wrote in message
news:bdi87u$tentc$(E-Mail Removed)...
>
> "Victor Bazarov" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > "Ashish" <(E-Mail Removed)> wrote...
> > >
> > > "Victor Bazarov" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > "Ashish" <(E-Mail Removed)> wrote...
> > > > >
> > > > > "Unforgiven" <(E-Mail Removed)> wrote in message
> > > > > news:bdhs8i$t2rsj$(E-Mail Removed)...
> > > > > > Tim Mierzejewski wrote:
> > > > > > > How do I clear the text from my screen, other than a bunch of

> \n's
> > > or
> > > > > > > endl's?
> > > > > >
> > > > > > C++ can not clear the screen, as indicated in the FAQ Victor

> pointed
> > > you
> > > > > to.
> > > > >
> > > > > Huh? C++ can do a lot of things using the OS specific libraries.

> Dont
> > > say
> > > > > C++ cannot clear the screen. Instead, you should say standard C++

> > cannot
> > > > > clear the screen.
> > > >
> > > > That's the only C++ we speak of here.
> > > >
> > > >
> > >
> > > Thats what I said too... but dont misguide the OP by saying that C++

> > cannot
> >
> > Misguide?
> >
> > > do this, or can do that. Guide him to an appropriate newsgroup. I am

> sure
> > > you understand that.

> >
> > But in all honesty, C++ cannot clear the screen. It's some OS-
> > specific library call that does that. Or sequence of characters
> > output to console or ... But it is not a language thing. And,
> > by the way, while there exist extensions to the language created
> > by some eager compiler vendors, there is only one C++ -- Standard.
> >
> > That's what we mean when we say "C++ cannot do that". Another
> > example: can C++ read files? Yes. Can C++ read JPEG files? Yes.
> > Can C++ read and display JPEG files? NO. Displaying them is not
> > a language feature. C++ cannot do that. Not standard, not any
> > other C++. The same with clearing the screen.
> >
> > Guiding others to a particular newsgroup is a voluntary thing. If
> > you stop me in the street and ask whether I could give you a lift
> > to a town a thousand kilometres away, I'll probably say "No, sorry,
> > I cannot do that", but I am not obligated to explain to you all
> > possible options you have or direct you to a bus station. It is
> > up to you to figure that out. (Of course it might be mighty kind
> > of me to point you to a bus stop, and I _probably_ would do that
> > if I knew where you were going -- The OP just asked whether there
> > was a way to clear the screen except outputting newline characters,
> > and there isn't). See the point?
> >
> > Anyway...
> >
> > Victor
> >
> >

>
> I agree with you. But if you tell me that you cannot give me a lift to a
> thown a thousand kilometers away doesnt mean that you should tell me that
> there is no way I can go to that town. Thats what the other person did.


No. Using the same analogy, the other person told you that you
can't get to another town in Victor's car. He didn't say that
clearing of the screen cannot be done. He said that clearing of
the screen cannot be done with C++. Get it?

> He
> said that C++ cannot...


And you think that C++ can? Show me.

> I am not saying that he or you HAVE to guide the OP
> to an appropriate newsgroup, its voluntary ofcourse, but dont MISguide him
> saying that it cannot be done. Get it?


Do you understand the difference between "it cannot be done" and
"it cannot be done using C++ means"? Saying the latter does NOT
imply the former, and in no way is misguiding. Get it?


 
Reply With Quote
 
Ashish
Guest
Posts: n/a
 
      06-27-2003

"Victor Bazarov" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Ashish" <(E-Mail Removed)> wrote in message
> news:bdi87u$tentc$(E-Mail Removed)...
> >
> > "Victor Bazarov" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > "Ashish" <(E-Mail Removed)> wrote...
> > > >
> > > > "Victor Bazarov" <(E-Mail Removed)> wrote in message
> > > > news:(E-Mail Removed)...
> > > > > "Ashish" <(E-Mail Removed)> wrote...
> > > > > >
> > > > > > "Unforgiven" <(E-Mail Removed)> wrote in message
> > > > > > news:bdhs8i$t2rsj$(E-Mail Removed)...
> > > > > > > Tim Mierzejewski wrote:
> > > > > > > > How do I clear the text from my screen, other than a bunch

of
> > \n's
> > > > or
> > > > > > > > endl's?
> > > > > > >
> > > > > > > C++ can not clear the screen, as indicated in the FAQ Victor

> > pointed
> > > > you
> > > > > > to.
> > > > > >
> > > > > > Huh? C++ can do a lot of things using the OS specific libraries.

> > Dont
> > > > say
> > > > > > C++ cannot clear the screen. Instead, you should say standard

C++
> > > cannot
> > > > > > clear the screen.
> > > > >
> > > > > That's the only C++ we speak of here.
> > > > >
> > > > >
> > > >
> > > > Thats what I said too... but dont misguide the OP by saying that C++
> > > cannot
> > >
> > > Misguide?
> > >
> > > > do this, or can do that. Guide him to an appropriate newsgroup. I am

> > sure
> > > > you understand that.
> > >
> > > But in all honesty, C++ cannot clear the screen. It's some OS-
> > > specific library call that does that. Or sequence of characters
> > > output to console or ... But it is not a language thing. And,
> > > by the way, while there exist extensions to the language created
> > > by some eager compiler vendors, there is only one C++ -- Standard.
> > >
> > > That's what we mean when we say "C++ cannot do that". Another
> > > example: can C++ read files? Yes. Can C++ read JPEG files? Yes.
> > > Can C++ read and display JPEG files? NO. Displaying them is not
> > > a language feature. C++ cannot do that. Not standard, not any
> > > other C++. The same with clearing the screen.
> > >
> > > Guiding others to a particular newsgroup is a voluntary thing. If
> > > you stop me in the street and ask whether I could give you a lift
> > > to a town a thousand kilometres away, I'll probably say "No, sorry,
> > > I cannot do that", but I am not obligated to explain to you all
> > > possible options you have or direct you to a bus station. It is
> > > up to you to figure that out. (Of course it might be mighty kind
> > > of me to point you to a bus stop, and I _probably_ would do that
> > > if I knew where you were going -- The OP just asked whether there
> > > was a way to clear the screen except outputting newline characters,
> > > and there isn't). See the point?
> > >
> > > Anyway...
> > >
> > > Victor
> > >
> > >

> >
> > I agree with you. But if you tell me that you cannot give me a lift to a
> > thown a thousand kilometers away doesnt mean that you should tell me

that
> > there is no way I can go to that town. Thats what the other person did.

>
> No. Using the same analogy, the other person told you that you
> can't get to another town in Victor's car. He didn't say that
> clearing of the screen cannot be done. He said that clearing of
> the screen cannot be done with C++. Get it?
>
> > He
> > said that C++ cannot...

>
> And you think that C++ can? Show me.
>
> > I am not saying that he or you HAVE to guide the OP
> > to an appropriate newsgroup, its voluntary ofcourse, but dont MISguide

him
> > saying that it cannot be done. Get it?

>
> Do you understand the difference between "it cannot be done" and
> "it cannot be done using C++ means"? Saying the latter does NOT
> imply the former, and in no way is misguiding. Get it?
>
>


Oh, why am I arguing with you anyways? I reinstalled my OS and lost all the
news and email filters. Time to ignore you and Dan Poop again. Goodbye.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox - Clear History? Paull Firefox 7 08-24-2012 04:49 PM
Response.Clear() doesn't clear David ASP .Net 2 01-31-2008 08:32 PM
Unrecognized element 'add' after <clear></clear> InvalidLastName ASP .Net Web Services 3 03-06-2007 03:07 AM
How Do I Clear search items? Wabby Wabusha Firefox 1 10-26-2004 08:36 PM



Advertisments