From: "Al Amzeen (Alexandr Amzin)" Newsgroups: comp.os.msdos.djgpp Subject: Re: How could I clear screen in C++??? Date: Tue, 18 Apr 2000 20:46:00 +0400 Organization: Fidolook Express page http://fidolook.da.ru Lines: 44 Message-ID: <8di55j$qvt$1@gavrilo.mtu.ru> References: <#ncDhZDq$GA DOT 261 AT net003s> <8desjg$iai$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> NNTP-Posting-Host: ppp104-134.dialup.mtu-net.ru X-Trace: gavrilo.mtu.ru 956078068 27645 212.188.104.134 (18 Apr 2000 17:14:28 GMT) X-Complaints-To: usenet-abuse AT mtu DOT ru NNTP-Posting-Date: 18 Apr 2000 17:14:28 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Fidolook Express V1.51rus for MS OE 5.0 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com == oneliner:Hali-gali, paratrooper...(c) Greetings, Hackrus ! You wrote: > I have found a way of doing this. If you put: > int i; > for (i=0;i<50;i++) > cout << "\n" << endl; > on the top of the text where the screen should be deleted, en put this: > int i; > for (i=0;i cout << "\n" << endl; > on the bottom of the text, then you should fill in 24-the rows of text=?? There some modes that can count as _text_ modes. some modes are 50 strings. Then we'll clear any screen in 50 strings. Use 25 (not 24) for plain txt mode, of course. :) > So if you have 4 rows of text on the screen, do this: > int i; > for (i=0;i<20;i++) > cout << "\n" << endl; > this would let you scroll down, so the text is at the top of the screen. > I now it's not a good way of clearing the screen, but it's possible in this > way!! > (Sorry for my bad english!!). Well, old batches were using it :). Hmmm...'for' is a heavy and harsh contruction. Catch that: cout << "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" << endl; For 25 row mode ;). > Hope you guys now a better way for doing this!! There are the ways: -cout -peeking-poking to the videomemory -clrscr() (it works!!!!) -clear(screen) in Allegro and more :). ps. I call it "be creative" ;).