starting new program with clear screen

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • crazylibrian
    New Member
    • Oct 2014
    • 1

    starting new program with clear screen

    i want to start a program in turbo c after first program but when i write second proram and execute it, it also shows output of previous program
    what to do..?
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    The console stdout of a C program imitates a 1968 computer's console typewriter where the paper is fed from a roll and just scrolls out. That is why there is no erase console capability in C.

    You have to write that yourself or it may be you can use some non-standard method of making a system call. Here you might be able to call system() and provide a argument to execute on the console command line. You would need to research this for your compiler and operating system.

    Comment

    • donbock
      Recognized Expert Top Contributor
      • Mar 2008
      • 2427

      #3
      You can print several newlines before your program does anything else. This will serve to separate the outputs of the program invocations.

      Comment

      Working...