Thread: Clear screen

  1. #1
    Registered User
    Join Date
    Sep 2002

    Clear screen

    I have a strange question.

    Is thier a clear screen function iostream.h?

    I ask this because I'm in a programming class where the teacher only allows you to use files already loaded on his system, so I can't use conio.h, or any of the other wonderful include files I have come to know and love (I never thought I'd say this, but I miss apstrings.....).

    And what's worse is that I have to program in a stripped down linux compilier so I can't use any of the microsoft files.

    Any ideas?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Ask your teacher
    a) is clear screen required for completing my assignments?
    b) is there a clear screen function in the environment you provide?

    If the answer to both is "no", then its easiest to forget about it.

    But if you're really desperate

    for ( int i = 0 ; i < 30 ; i++ ) cout << endl;
    Is a reasonably portable way of achieving what you want

    Or how about
    Or even
    cout << "\033[2J";
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

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