Thread: A few questions on system()

  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    8

    A few questions on system()

    I've been reading a lot of posts recently and found out that's it's baaaad to call system() functions such as "cls" and "PAUSE".

    I'm fine to use
    [code]cin.get();
    cout << "Please press enter to continue.";
    [code]
    but I don't know how to implement a "cls" style command without calling the system or downloading some version of conio.h that has cls(); and other old functions.

  2. #2
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    you can't in any standard way, but each OS has it's own ostensibly safe way to do it.

    edit: check the FAQ. I personally recommend option 5.
    Last edited by major_small; 03-30-2006 at 02:38 AM.
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  3. #3
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    Q: How do I clear the screen?
    A: Pick it up and shake it like an Etch-a-sketch.

    Above is someone's signature on another board

  4. #4
    C++No0b!!!
    Join Date
    Jul 2005
    Location
    penn
    Posts
    66
    why is it so bad to use the system(); calls. i use cls all the time...

  5. #5
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    I spose system pause is one that could be easily avoided...but is it as much of a crome to use cls?

  6. #6
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    Quote Originally Posted by ReLiEnThAwK
    why is it so bad to use the system(); calls. i use cls all the time...
    Search the boards and you'll surely find the answer to that - I remember answering it a while ago. No, I'm not answering again.
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Notification area (system tray) and other questions
    By BobS0327 in forum Linux Programming
    Replies: 0
    Last Post: 04-21-2006, 05:12 PM
  2. measuring system resources used by a function
    By Aran in forum C Programming
    Replies: 1
    Last Post: 03-13-2006, 05:35 PM
  3. New system build wont boot
    By lightatdawn in forum Tech Board
    Replies: 7
    Last Post: 12-02-2005, 06:58 AM
  4. Using mscorlib & system namespace in an MFC?
    By Robert_Sitter in forum C++ Programming
    Replies: 3
    Last Post: 11-13-2005, 06:47 PM
  5. Problem Reporting System. Need Advide!
    By brunomiranda in forum Tech Board
    Replies: 9
    Last Post: 09-25-2003, 09:21 PM