Thread: clear screen

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    70

    clear screen

    I'm sure there is a command better than system("CLS") to clear the screen. I'm finding this very slow. Any help would be appreciated.

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    Yes and no.
    There is no portable way to clear the screen it totally depends upon your compiler and operating system. Read the FAQ. All the answers you seek are in there.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  3. #3
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    > I'm finding this very slow.
    So does everyone else.

    >I'm sure there is a command better than system("CLS") to clear the screen.
    It depends on what you are willing to sacrifice. If you can afford a loss of portability then you should use a system specific solution such as Borland's clrscr function, they tend to be considerably faster than the system function. If portability is your goal then you should figure out a way to avoid clearing the screen if it isn't absolutely necessary.

    -Prelude
    My best code is written with the delete key.

  4. #4
    Registered User
    Join Date
    Sep 2002
    Posts
    1,640
    If you want a faster clear screen function you indeed probably
    end up with a compiler specific and not portable function,
    What's your compiler?

  5. #5
    Registered User
    Join Date
    Sep 2002
    Posts
    70
    i'm using visual studios.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. CLear Screen Routine
    By AQWst in forum C++ Programming
    Replies: 4
    Last Post: 12-13-2004, 08:24 PM
  2. i am not able to figure ot the starting point of this
    By youngashish in forum C++ Programming
    Replies: 7
    Last Post: 10-07-2004, 02:41 AM
  3. Getting a clear screen...
    By Finchie_88 in forum C++ Programming
    Replies: 13
    Last Post: 09-03-2004, 05:38 PM
  4. Clear Screen Again!!!
    By trang in forum C Programming
    Replies: 3
    Last Post: 12-13-2003, 08:36 AM
  5. Yet another clear screen thread :D
    By kermit in forum Linux Programming
    Replies: 2
    Last Post: 11-20-2003, 05:14 AM