Thread: clearing screen and test data

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    1

    Smile clearing screen and test data

    Hi, im new to programming and im writing a dos based program for an assignment.
    Is there a way to clear the screen when a new function is called?
    Mine is a menu driven program and it works fine, but it looks cluttered when a new choice is made and the old stuff is still on the screen. Also, does c have something similar to javas 'screenmirror()' which enables you to capture test data to a text file or similar.
    Thanks in advance for any help.

    p.s I apologise if these are stupid questions!

  2. #2
    Me want cookie! Monster's Avatar
    Join Date
    Dec 2001
    Posts
    680
    It's not a stupid question (clear the screen), but it has been asked many times.
    A search on this site should give you about 100+ hits.

    Also available: FAQ

    Here is one that works for DOS:
    Code:
    #include <stdlib.h>
    
    system("cls");
    I'm not sure what you mean with the screenmirror() function...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems Clearing Portion of Screen
    By Peter5897 in forum Windows Programming
    Replies: 2
    Last Post: 05-29-2006, 03:23 AM
  2. printing text
    By Benzakhar in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 03-27-2004, 08:45 AM
  3. DOS, Serial, and Touch Screen
    By jon_nc17 in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 01-08-2003, 04:59 PM
  4. Inline ASM and Screen Clearing
    By Wavering in forum C Programming
    Replies: 0
    Last Post: 12-08-2001, 06:03 AM
  5. read data
    By in_need in forum C Programming
    Replies: 2
    Last Post: 10-30-2001, 08:10 AM