Thread: Newb question - Clear command line screen?

  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    2

    Question Newb question - Clear command line screen?

    Is there an easy way to clear the screen of characters?

    I've made a simple equation solver, but after solving several equations the screen gets kind of messy. Since it essentially just re-runs itself over and over, is there a simple way to clear the command line screen at the end of each calculation?

    Sorry if this is a stupid question, but I've had no luck finding any information elsewhere about this.

    Thanks!

    P.S. this is run in windows, and I'd rather not add any new .h files.

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,794
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    David J. Wheeler

  3. #3
    Registered User
    Join Date
    Apr 2008
    Posts
    2
    Thanks man.

    I used the search function, and google but I had no luck for some reason.

    Much appreciated.

    Seems odd that there wouldn't be a simple way to do this that's platform independent, but thanks

  4. #4
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,794
    Seems odd that there wouldn't be a simple way to do this that's platform independent, but thanks
    There are platforms where terminal does not exists, stdout could be connected to the file, printer or something else... standard C function should still work in such envirounment - no much sense to clear screen there...
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    David J. Wheeler

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting a clear screen...
    By Finchie_88 in forum C++ Programming
    Replies: 13
    Last Post: 09-03-2004, 05:38 PM
  2. Clear Screen Again!!!
    By trang in forum C Programming
    Replies: 3
    Last Post: 12-13-2003, 08:36 AM
  3. Yet another clear screen thread :D
    By kermit in forum Linux Programming
    Replies: 2
    Last Post: 11-20-2003, 05:14 AM
  4. How to clear the screen?
    By Zopyrus in forum C++ Programming
    Replies: 8
    Last Post: 11-07-2003, 10:20 PM
  5. how do i clear screen
    By C today in forum C Programming
    Replies: 2
    Last Post: 09-26-2001, 02:07 PM