clear the screen in console input

This is a discussion on clear the screen in console input within the Linux Programming forums, part of the Platform Specific Boards category; I am wondering how can I clear in a console application under Linux or Unix environment?...

  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, 03:19 PM
  2. About aes
    By gumit in forum C Programming
    Replies: 13
    Last Post: 10-24-2006, 04:42 PM
  3. Console Screen Resolution!!!!
    By Perica in forum C++ Programming
    Replies: 1
    Last Post: 10-25-2002, 08: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, 06: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, 12:26 PM

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