User Profile

Collapse

Profile Sidebar

Collapse
rdallas
rdallas
Last Activity: Sep 21 '07, 05:01 AM
Joined: Sep 21 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • rdallas
    replied to Clear Screen in C using Dev C++
    in C
    The previous post assumes you are using Unix. On Windows, you can clear the screen by using the "cls" command; there is no "clear" command on Windows. I was able to use the following code to clear the screen (command window) using Borland C++ 5.5.1 for Win32 on Windows XP:

    Code:
    #include <iostream>
    
    int main( int argc, char *argv[] )
    {
        system("cls");
    }
    See more | Go to post

    Leave a comment:


  • rdallas
    replied to Clear Screen in C using Dev C++
    in C
    You can use the following C statement to clear your screen:

    Code:
    system("sh -c clear");
    You are executing the sh shell program (usually /bin/sh) and having it execute the built-in "clear" command. You need to use the "-c" option to tell sh that the next option is a built-in command, not a file to be executed. See the man page on sh for more info.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...