clear screen function

This is a discussion on clear screen function within the C Programming forums, part of the General Programming Boards category; what is the function to clear screen???...

  1. #1
    Registered User sballew's Avatar
    Join Date
    Sep 2001
    Posts
    157

    clear screen function

    what is the function to clear screen???
    Sue B.

    dazed and confused


  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    There is no ANSI function to clear the screen. It is going to depend on what type of programming you're doing, and on what OS.

    In a console window, under dos/windows, you can do:

    system("cls");

    There is also an ansi escape sequence you can use.

    puts( "\e[2J" );


    Quzah.

  3. #3
    Registered User sballew's Avatar
    Join Date
    Sep 2001
    Posts
    157
    O/S is UNIX (Solaris I think)
    Sue B.

    dazed and confused


  4. #4
    Registered User
    Join Date
    Oct 2001
    Posts
    36
    execlp("clear",0);
    or execlp("tput clear",0);

  5. #5
    Registered User EvenFlow's Avatar
    Join Date
    Oct 2001
    Posts
    422
    Ramble on...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  2. Calling a Thread with a Function Pointer.
    By ScrollMaster in forum Windows Programming
    Replies: 6
    Last Post: 06-10-2006, 09:56 AM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 07:39 AM
  4. Clear Screen Function?
    By Punkture in forum C Programming
    Replies: 3
    Last Post: 05-05-2003, 10:25 PM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 06:06 PM

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