How do I clear the text from my screen, other than a bunch of \n's or
endl's?
Tim M. 18 59516
"Tim Mierzejewski" <ti******@yahoo.com> 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
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
"Unforgiven" <ja*******@hotmail.com> wrote in message
news:bd************@ID-136341.news.dfncis.de... 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
"Ashish" <as*****@hotmail.com> wrote... "Unforgiven" <ja*******@hotmail.com> wrote in message news:bd************@ID-136341.news.dfncis.de... 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.
"Ashish" <as*****@hotmail.com> wrote... "Victor Bazarov" <v.********@attAbi.com> wrote in message news:vf************@corp.supernews.com... "Ashish" <as*****@hotmail.com> wrote... "Unforgiven" <ja*******@hotmail.com> wrote in message news:bd************@ID-136341.news.dfncis.de... > 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
"Victor Bazarov" <v.********@attAbi.com> wrote in message
news:vf************@corp.supernews.com... "Ashish" <as*****@hotmail.com> wrote... "Victor Bazarov" <v.********@attAbi.com> wrote in message news:vf************@corp.supernews.com... "Ashish" <as*****@hotmail.com> wrote... > > "Unforgiven" <ja*******@hotmail.com> wrote in message > news:bd************@ID-136341.news.dfncis.de... > > 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
"Victor Bazarov" <v.********@attAbi.com> wrote in message
news:vf************@corp.supernews.com... "Ashish" <as*****@hotmail.com> wrote... "Victor Bazarov" <v.********@attAbi.com> wrote in message news:vf************@corp.supernews.com... "Ashish" <as*****@hotmail.com> wrote... > > "Unforgiven" <ja*******@hotmail.com> wrote in message > news:bd************@ID-136341.news.dfncis.de... > > 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.
"Ashish" <as*****@hotmail.com> wrote in message
news:bd************@ID-75446.news.dfncis.de... "Victor Bazarov" <v.********@attAbi.com> wrote in message news:vf************@corp.supernews.com... "Ashish" <as*****@hotmail.com> wrote... "Victor Bazarov" <v.********@attAbi.com> wrote in message news:vf************@corp.supernews.com... > "Ashish" <as*****@hotmail.com> wrote... > > > > "Unforgiven" <ja*******@hotmail.com> wrote in message > > news:bd************@ID-136341.news.dfncis.de... > > > 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?
"Victor Bazarov" <v.********@attAbi.com> wrote in message
news:vf************@corp.supernews.com... "Ashish" <as*****@hotmail.com> wrote in message news:bd************@ID-75446.news.dfncis.de... "Victor Bazarov" <v.********@attAbi.com> wrote in message news:vf************@corp.supernews.com... "Ashish" <as*****@hotmail.com> wrote... > > "Victor Bazarov" <v.********@attAbi.com> wrote in message > news:vf************@corp.supernews.com... > > "Ashish" <as*****@hotmail.com> wrote... > > > > > > "Unforgiven" <ja*******@hotmail.com> wrote in message > > > news:bd************@ID-136341.news.dfncis.de... > > > > 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.
Ashish wrote: 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.
Is there some reason you had three screens worth of quotes for this tiny
reply?
Brian Rodenborn
"Default User" <fi********@company.com> wrote in message
news:3E***************@company.com...
Ashish wrote:
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.
Is there some reason you had three screens worth of quotes for this tiny reply?
Yes. A couple of reasons actually. First, it has become an off-topic thread
and anyone who cares to read off-topic posts should probably take the
efforts to scroll down to the bottom. Second, I am too lazy.
--
-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
On Fri, 27 Jun 2003 13:30:17 -0400, "Ashish" <as*****@hotmail.com>
wrote in comp.lang.c++: "Unforgiven" <ja*******@hotmail.com> wrote in message news:bd************@ID-136341.news.dfncis.de... 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.
I guarantee you that I can show you several systems where C++,
standard or not, cannot clear the screen. For the simple reason that
there IS NO SCREEN. One of the reasons C++ does not support a screen
is that it does not require one.
--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
"Jack Klein" <ja*******@spamcop.net> wrote in message
news:sr********************************@4ax.com... On Fri, 27 Jun 2003 13:30:17 -0400, "Ashish" <as*****@hotmail.com> wrote in comp.lang.c++:
"Unforgiven" <ja*******@hotmail.com> wrote in message news:bd************@ID-136341.news.dfncis.de... 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.
I guarantee you that I can show you several systems where C++, standard or not, cannot clear the screen. For the simple reason that there IS NO SCREEN. One of the reasons C++ does not support a screen is that it does not require one.
I am sorry, I had put my statement wrongly. But, since the OP asked about
clearing the screen, I assumed he had a screen (a computer monitor).
--
-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
you do not want to use process.h since it is not platform independant,
use stdlib.h instead
regards
pol jak
Unforgiven wrote: 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>
> Is there some reason you had three screens worth of quotes for this tiny reply?
Laziness.
I hate the griping about top posting in the newsgroup (which is a heinous
crime IMO and come the revolution, top-posters will be second against the
wall to be shot with me in the role of executioner).
But some people who gripe against top-posters commit the equally henious
crime of not pruning old conversation. Why should I have to download reams
of old conversation and then scroll through it just to see a reply? IMO they
are more guilty than top-posters (and again, come the revolution,
non-pruners will be first against the wall to be shot with me in the role of
executioner).
Stephen Howe
> I guarantee you that I can show you several systems where C++, standard or not, cannot clear the screen. For the simple reason that there IS NO SCREEN. One of the reasons C++ does not support a screen is that it does not require one.
I agree with you. But lets go further...
Equally I can show you systems where there is NO SUCH THING AS A FILE. So
why does both C and C++ provide stdio/streams? That is an OS thing and IMO,
should be removed.
Also the assumption that dynamic memory is available via new/malloc() should
be removed. That also is an OS thing and IMO should be removed.
Stephen Howe
"Stephen Howe" <SP*******************@tnsofres.com> wrote in message
news:3e***********************@reading.news.pipex. net... Is there some reason you had three screens worth of quotes for this tiny reply? Laziness.
I hate the griping about top posting in the newsgroup (which is a heinous crime IMO and come the revolution, top-posters will be second against the wall to be shot with me in the role of executioner).
But some people who gripe against top-posters commit the equally henious crime of not pruning old conversation. Why should I have to download reams of old conversation and then scroll through it just to see a reply? IMO
they are more guilty than top-posters (and again, come the revolution, non-pruners will be first against the wall to be shot with me in the role
of executioner).
No problem.... here I am, shoot me, spam my email address, hack my website,
DOS attack my webserver and do whatever you feel like.
I visit this newsgroup for advise and sometimes even help others. I dont
like top posters and non-pruners too. But when people weep over not pruning
posts in some stupid off topic post, it pisses me off. Please dont read this
message, it has nothing to do with C++.
-A
Ashish wrote: "Default User" <fi********@company.com> wrote in message news:3E***************@company.com... Is there some reason you had three screens worth of quotes for this tiny reply?
Yes. A couple of reasons actually. First, it has become an off-topic thread and anyone who cares to read off-topic posts should probably take the efforts to scroll down to the bottom. Second, I am too lazy.
Neither is a good excuse.
1. We can't really rail at the top-posters when people validate their
point by failing to edit the quotes down to a reasonable subset. If a
post is worth responding to, it's worth taking the time to do it
correctly. If not, then the better solution is to not reply at all. The
fact that it was OT does not matter.
2. I find it difficult to believe that it was that much work. I used to
use trn with vi as the editor, yet always managed to trim quotes. You
use a windows based newsreader, where you merely needed to drag down on
some text and hit delete.
Brian Rodenborn This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: NeoPhreak |
last post by:
How would you clearn the screen in a console program???
Thanks
NeoPhreak >.<
|
by: Peter |
last post by:
I am just trying to learn python, to use for some fairly basic command
line utilities which will run in either Windows/DOS or Linux. I cannot
find a platform neutral way of manipulating the screen....
|
by: ritchie |
last post by:
Hi,
I am trying to clear the screen in my program.
I am loking for something that will work on all compilers, especially
Borland & MS Visual Studio 6.
On Visual studio I used 'system("cls");'...
|
by: John |
last post by:
Hi
I have the following in a Perl script. I just want to "clear screen" but it
does not work.
I don't think I've got my client and server sides confused.
Any ideas?
<SCRIPT...
|
by: REDBAIT |
last post by:
Hi Guys,
Am using Windows 2000 and Dev C++ to create C programs. I'm trying to use clear screen and other graphic functions such as positioning output on screen. Have seen some documents that...
|
by: sajithamol |
last post by:
I have an Applet that has three buttons on it, one being a clear screen button. I have it setup right now so it draws a rectangle the size of the applet and fills it with the background color. But...
|
by: owl |
last post by:
and here I thought I was going to finally be able to change the world
AND contribute back to python with my amazing clear screen extension -
but I can't get it to work. ;(
Copying from...
|
by: pbd22 |
last post by:
Hi.
Does anybody know how to issue a clear screen command like DOS "cls"
in a telnet session?
Thanks!
|
by: Kid Programmer |
last post by:
Hello guys. I was wondering how you can clear the screen in a java program. Here is the code for my program:
import javax.swing.SwingUtilities;
import javax.swing.JFrame;
import...
|
by: sganeshsvk |
last post by:
i want to clear the screen command prompt for mysql in windows XP...
In linux we use (CTRL + L) for clear the screen in mysql prompt....
i already use this command ( \c ) then ( \! clear ) for...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
|
by: AndyPSV |
last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
|
by: Arjunsri |
last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
|
by: WisdomUfot |
last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
|
by: Carina712 |
last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
|
by: BLUEPANDA |
last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
|
by: Rahul1995seven |
last post by:
Introduction:
In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
|
by: Ricardo de Mila |
last post by:
Dear people, good afternoon...
I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control.
Than I need to discover what...
|
by: Johno34 |
last post by:
I have this click event on my form. It speaks to a Datasheet Subform
Private Sub Command260_Click()
Dim r As DAO.Recordset
Set r = Form_frmABCD.Form.RecordsetClone
r.MoveFirst
Do
If...
| |