Thread: How to clear the screen?

  1. #1
    Registered User
    Join Date
    Nov 2003
    Posts
    11

    How to clear the screen?

    Hey everyone, my first post here

    Is there a code for C++ that will make the dos screen clear up, i.e. after a Switch code, and when you choose your number the dos screen will clear up and only putting in the "facts" of what you chose to have. Sorry for my bad english, if you do not know what i mean please say so, i'll try and elaborate further


    Best Regards,
    Micheal

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    How to read the FAQ?

    You should have taken a few seconds to read the FAQ and board rules, and all would be answered.

    [edit]Fixed link.[/edit]

    Quzah.
    Last edited by quzah; 11-07-2003 at 09:09 PM.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Nov 2003
    Posts
    11
    I apologise, I tried reading the faq but your link doesn't work?

    Regards,
    Micheal

  4. #4
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Well if you want specifics, go here. I fixed the first link, so you'll probably want to go look at it also for other topics. Or just go from the link on the main page.

    Quzah.
    Hope is the first step on the road to disappointment.

  5. #5
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    Here, let me help Quzah out.
    Programming FAQ
    There's also a link at the bottom of this page.

  6. #6
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    Ok good, now Zopyrus can choose between four links to click.

  7. #7
    Registered User
    Join Date
    Nov 2003
    Posts
    11
    Thanks alot for your help guys!

    However i Have another question which i couldn't find in the faq,

    I've used a 'Switch' code with different options to choose from when running the program. What I want to know is how to make the program restart after that you're done with one option.. i want the program to restart for example when ur done, it'll ask "you want to restart?" if you type Yes, then all the options will come as in the beginning. What is the code for that?

    Thanks,
    Micheal

  8. #8
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Just use a do..while loop.

    Code:
    do
    {
      //do all processing etc.
      
      //ask the user if they want to continue
    
    } while( user_wants_to_continue == true );
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  9. #9
    Registered User
    Join Date
    Nov 2003
    Posts
    11
    ahhhh as simple as that!

    Thanks for the help!

    Best Regards,
    Micheal

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. CLear Screen Routine
    By AQWst in forum C++ Programming
    Replies: 4
    Last Post: 12-13-2004, 08:24 PM
  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