Clear Screen

This is a discussion on Clear Screen within the C++ Programming forums, part of the General Programming Boards category; Hi, This probably seems like a stupid question, but what is the best way to clear the screen of a ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    13

    Question Clear Screen

    Hi,

    This probably seems like a stupid question, but what is the best way to clear the screen of a console application?

    I've tried cout.clear(), but I am unsure what arguments need to be passed.

    Thanks in advance...

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    241
    well I haven't made a program with that for a while, but I believe that it is clrscr(); and you will need to include conio.h

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    13

    sorry...

    whoops

  4. #4
    Unregistered Leeman_s's Avatar
    Join Date
    Oct 2001
    Posts
    753

    ok

    at last, i get to help someone! ok, its real simple. i use msvc++ 6. put this in:

    system("CLS");

    works perfect, i dont think you need to include any extra header files, if so just tell me and i'll find out.

  5. #5
    Registered User
    Join Date
    Sep 2001
    Posts
    13

    wow

    That works really well, much simpler than the method(s) in the faq...

    Thanks!

  6. #6
    Registered User bljonk's Avatar
    Join Date
    Oct 2001
    Posts
    70

    prototype

    #include <stdlib.h>
    void system(char x[]);

  7. #7
    Banned frenchfry164's Avatar
    Join Date
    Oct 2001
    Posts
    1,552
    clrscr() is less letters, and isn't slow like the system command.

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, 07: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, 07:36 AM
  5. Yet another clear screen thread :D
    By kermit in forum Linux Programming
    Replies: 2
    Last Post: 11-20-2003, 04:14 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21