MSFN Forum: Clear Screen in C++ - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Clear Screen in C++ Please help in clear screen Rate Topic: -----

#1 User is offline   ootsoo 

  • Shinkansen
  • Pip
  • Group: Members
  • Posts: 92
  • Joined: 12-May 05

  Posted 16 May 2005 - 07:54 AM

hi people,

I need a help frm u all!
is there any functions that helps to clear 50 % of the cosole screen? :blushing:
i give

for (i=0;i<25;i++)
cout<<"sample line<<endl;


So this code prints 25 lines.
i need to clear screen half of the screen.
i.e it shld clear the line numbers 25 till 15. :huh:

system("cls");
clears the full screen,


regards,
ootsoo



#2 User is offline   Dany67 

  • Newbie
  • Group: Members
  • Posts: 17
  • Joined: 17-November 03

Posted 20 May 2005 - 12:09 PM

what about clearing all screen and rewriting only your first or last half ?

#3 User is offline   azagahl 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 489
  • Joined: 12-November 04

Posted 20 May 2005 - 06:43 PM

If the screen has 25 lines then you could print 10 blank lines and reprint the bottom 15 lines.

What environment does this need to work in?
Can you depend on ANSI support? Can you use libcurses? Is it a Windows console program??

Console window manipulation is really platform-specific and isn't directly available in C++.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy