Thread: CLear Screen Routine

  1. #1
    Registered User
    Join Date
    Nov 2004
    Posts
    41

    CLear Screen Routine

    I have created a function to clear my screen in between displaying various menus within a program. I am not sure how to have the cursor position back at the top of the screen for displaying the next menu after selecting the option to transfer to the new one. Is there an easier way to clear the screen or can I use the code I have and add something to reposition the cursor. (I am including the code I have to clear the screen in case anyone wants to look at it).

    int Counter;

    void CLR_Screen()
    {
    for (Counter = 0; Counter < 100; Counter++)
    {
    printf("\n");
    }
    }

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    The FAQ will give you more detail concerning this issue than you probably want.
    My best code is written with the delete key.

  3. #3

  4. #4
    Registered User
    Join Date
    Nov 2004
    Posts
    41

    Clear Screen Routine

    I guess I should have checked there first. Thanks for your help.

  5. #5
    Registered User cfrost's Avatar
    Join Date
    Apr 2004
    Posts
    119

    Try out my library

    Hey why don't you try my console library at my web site its called Conumb it is for both VC and DevC++ My Homepage
    Software is like sex it is good when it is free

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Clear Screen in C++ console
    By ay_okay in forum C++ Programming
    Replies: 9
    Last Post: 12-21-2004, 04:05 AM
  2. i am not able to figure ot the starting point of this
    By youngashish in forum C++ Programming
    Replies: 7
    Last Post: 10-07-2004, 02:41 AM
  3. Getting a clear screen...
    By Finchie_88 in forum C++ Programming
    Replies: 13
    Last Post: 09-03-2004, 05:38 PM
  4. Clear Screen Again!!!
    By trang in forum C Programming
    Replies: 3
    Last Post: 12-13-2003, 08:36 AM
  5. Yet another clear screen thread :D
    By kermit in forum Linux Programming
    Replies: 2
    Last Post: 11-20-2003, 05:14 AM