Thread: Clear screen???

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    17

    Clear screen???

    Hello all,

    Is there another function besides system() I can use to clear the screen? The constant flicker is annoying.

    cpp4ever
    ------------------------------------------
    Normally I'd put something clever, but that isn't the point of being here now is it?

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Perhaps you should read the FAQ like everyone else? No, wait, nobody reads the FAQ, nevermind. Ask away...

    That and the fact that you provide _NO_ information on what OS you're running, what compiler you're using...

    [sarcasm]I just love these questions...[/sarcasm]

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Aug 2001
    Posts
    207
    >>Clear screen???

    LOL

    Wipe it

  4. #4
    Registered User dune911's Avatar
    Join Date
    Sep 2001
    Posts
    140
    i wrote a small function to do this
    it just prints some \n on the screen...

    Code:
    int my_cls()
    {
     my_lines(50);
    
     return 0;
    }
    
    int my_break()
    {
     my_newline();
     printf( "[Enter] drcken zum fortzufahren... \n" );
     getch();
    
     return 0;
    }
    
    int my_newline()
    {
     printf( "\n" );
    
     return 0;
    }
    
    int my_lines(int x)
    {
     int y;
     for(y=1; y<=x; y=y+1)
     {
      my_newline();
     }
    
     return 0;
    }
    that's the way a newbie helps himself *eg*

  5. #5
    Code Warrior
    Join Date
    Nov 2001
    Posts
    669
    Command "clrscr()". This command uses "conio.h" library.
    Current projects:
    1) User Interface Development Kit (C++)
    2) HTML SDK (C++)
    3) Classes (C++)
    4) INI Editor (Delphi)

  6. #6
    Hmmmmm, tough one

    Let me think.....
    ...

    thinking....

    ...
    Ok got it.

    Read the FAQ!
    Last edited by maes; 12-05-2001 at 02:31 PM.

  7. #7
    I thought clrscr() was a C++ thing.

    gonna have to look that one up
    DrakkenKorin

    Get off my Intarweb!!!!

  8. #8
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    >>> I thought clrscr() was a C++ thing.

    It is not ANSI C or C++. It is a function included by some, not all, compiler vendors.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  9. #9
    wavering
    Guest
    First post so if this screws up please forgive. I too have been mystified as a C beginner by the difficulty of clearing the screen. I finally resorted to writng an asm routine to do it and then discovered it can also be done by Bios interrupts ...

  10. #10
    Registered User
    Join Date
    Oct 2001
    Posts
    197
    Code:
    int count;
    for(count=0;count<20;count++, putchar('')) ; /* e.g for 80*20 a screen */
    klausi
    When I close my eyes nobody can see me...

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