Thread: clear the screen in console input

  1. #1
    Registered User
    Join Date
    Jul 2002
    Posts
    7

    clear the screen in console input

    I am wondering how can I clear in a console application under Linux or Unix environment?

  2. #2
    Registered User
    Join Date
    Jul 2002
    Posts
    7
    sorry, I was saying "clear the screen" in last post...

  3. #3
    Registered User
    Join Date
    Jul 2002
    Posts
    2

    Post

    Try this command to clear the screen

    system("clear")

  4. #4
    Registered User
    Join Date
    Jul 2002
    Posts
    7
    I got this error when I use system('clear');


    main.cc: In function `int main (int, char **)':
    main.cc:98: character constant too long
    main.cc:98: cannot convert `int' to `const char *' for argument `1' to
    `system (const char *)'


    any help?

  5. #5
    Registered User
    Join Date
    Jul 2002
    Posts
    7
    Oh I used ' instead of ".

    It is working now
    thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Console application - input handling
    By Something in forum C++ Programming
    Replies: 4
    Last Post: 06-09-2007, 02:19 PM
  2. About aes
    By gumit in forum C Programming
    Replies: 13
    Last Post: 10-24-2006, 03:42 PM
  3. Console Screen Resolution!!!!
    By Perica in forum C++ Programming
    Replies: 1
    Last Post: 10-25-2002, 07:45 AM
  4. splitting the screen in a Win32 console application
    By watcher_b in forum C Programming
    Replies: 1
    Last Post: 10-19-2002, 05:22 PM
  5. How do I clear screen in a C program?
    By DarkboyBlue in forum C Programming
    Replies: 6
    Last Post: 08-21-2002, 11:26 AM