Thread: Clearing The Screen

  1. #16
    Registered User
    Join Date
    Nov 2001
    Posts
    32

    Thumbs up Re: what about this

    [QUOTE]Originally posted by Phoenix
    #include <windows.h>

    system("cls");
    [/QUOTE

    I must disagree with you on that, there is no need what so ever in including <windows.h> the system("cls"); will work anyway...

  2. #17
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    >>> system("cls");

    ... and then you should read the FAQ to find out why that is such a bad idea...

    http://www.cprogramming.com/boardfaq.html#execs

    ... for example is one reason.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #18
    Registered User
    Join Date
    Nov 2001
    Posts
    8

    Thumbs up Clearing The Screen

    A Big Thanks to all that helped me out on my two problems..
    and for those interested..i solved my clear screen problem really easy by simply using:


    #include <stdlib.h>


    system("cls")



    it works perfectly you just put the system("cls") where ever you want the screen to clear..


    thnx again..


    kimmiej

  4. #19
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    "You can lead a horse to water.... "
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  5. #20
    Unregistered
    Guest
    Sorry for my relative lack of knowledge, but if you copied the header from Borland (conio.h) and overwrote Microsoft's would clrscr() work?

  6. #21
    Registered User Robert_Ingleby's Avatar
    Join Date
    Oct 2001
    Posts
    57

    Whats the point in trying anymore?

    Well, considering as nowhere in the previous posts before mine does it confirm what compiler is being used, I thought my offer of clrscr(); was a good one, considering no mention of compilers was made.


    Its a shame that you are not as clever as programmers as you are rude and ungratefull, maybee then, you wouldnt have had to post here in the first place.

    If unregistered would like to continue this conversation then please repost here.

    As for helping, I will now not continue to try.

  7. #22
    If you are running Linux, use system("clear"). If you are using DOS, here's my favorite way.

    cout << "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";

    And that should be enought to clear the screen.
    What will people say if they hear that I'm a Jesus freak?
    What will people do if they find that it's true?
    I don't really care if they label me a Jesus freak, there is no disguising the truth!

    Jesus Freak, D.C. Talk

    -gnu-ehacks

  8. #23
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    >>>
    Its a shame that you are not as clever as programmers as you are rude and ungratefull, maybee then, you wouldnt have had to post here in the first place.
    <<<

    It is also a shame that so many people offer truly bad advice...
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  9. #24
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    ahem...

    for remarkable control over your textual display beyond your wildest dreams... tinker [safely, within 32K, which is 80 by 25 by 2] with 0xb800:0000...
    hasafraggin shizigishin oppashigger...

  10. #25
    Unregistered
    Guest

    Adrianxw

    Perhaps 'Adrianxw' would like to tell us all how and where to obtain the crystal ball he so obviously posesses. If he took time to study the posts before mine, he might just be able to work out (painful for him as it may be), that there were absolubtly no mentions of the users compiler.

    Therefore their ungrateful response, deserved my critisism.

    My response to writers of rude and ungrateful Emails that take up my valuble time to read and respond to, is this:

    "If you can't say anything nice, don't say anything at all", something I learnt when I was 5!

    See the moderators views on posts like the one sent in response to my help. Now, can we please get on with sorting out programming issues, instead of all this petty squabling.

  11. #26
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    Perhaps 'Adrianxw' would like to tell us all how and where to obtain the crystal ball he so obviously posesses.

    It can be purchased for $4.99 at the magic crystal ball shop or ordered on CD.

    I think the problem is solved. If you want to know how to clear the screen in about any environment possible, read theFAQ that's what it is for.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  12. #27
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    Sorry NV, I know you locked it, but I think there are a couple of important points to be made which Mr Ingleby doesn't seem to understand.

    1. The FAQ is there to help people. Clearing the screen is probably the most frequently asked question on this, (and other), boards. Directing people to the FAQ is a service. There is a lot of good advice in the FAQ.

    2. We now have a guy who can clear the screen with system(). Great, he is using the wrong tool. When his programs start to run too slowly, he will not understand why. The fact is, system() is bad advice.

    Finally,

    >>> that there were absolubtly no mentions of the users compiler.

    ... true, hence he should look in the FAQ. What is the point of suggesting a compiler specific method, when you don't know what compiler he is using?
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Feedback: Functional Specification Wording
    By Ragsdale85 in forum C++ Programming
    Replies: 0
    Last Post: 01-18-2006, 04:56 PM
  2. char copy
    By variable in forum C Programming
    Replies: 8
    Last Post: 02-06-2005, 10:18 PM
  3. clearing the screen
    By ssharish in forum C Programming
    Replies: 2
    Last Post: 02-01-2005, 09:00 PM
  4. 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
  5. Clearing the screen
    By Shadow in forum C Programming
    Replies: 4
    Last Post: 05-23-2002, 01:40 PM