Thread: system("cls") question!

  1. #1
    Registered User Pecado's Avatar
    Join Date
    Sep 2010

    Question system("cls") question!

    Hello everyone, new one here :).
    Well I've just got one simple question: Does anybody know if the system("cls") command can be limited? I mean, that it doesn't erase all of the screen but up to certain point.
    For example, if there is a ascii art in the begining, and a "menu" then, and let's say everytime I select an option, I want to erase the menu (to show the new one) but not the screen.
    So basically, can it be limited with a {} for example or something?

  2. #2
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    United States
    The answer to your question is cls cannot erase only an area, it will clear the screen. CLS itself is just a tiny executable that you can invoke on a command line, and there is no option like the one you want.

    I don't think it is worth the effort to do anything more complicated than deleting the whole console screen and redrawing whatever you actually want, anyway. You'd spend maybe 30 minutes coding time doing it your way to save 0.0026 seconds of the end users time.

  3. #3
    Registered User NeonBlack's Avatar
    Join Date
    Nov 2007
    It sounds like you might want to consider using conio or *curses.
    I copied it from the last program in which I passed a parameter, which would have been pre-1989 I guess. - esbo

  4. #4
    Registered User Pecado's Avatar
    Join Date
    Sep 2010
    to whiteflags: ok thanks for the answer, really helpful.

    to NeonBlack: using conio... conio is a library, which command? and no idea what *curses is :S.

  5. #5

  6. #6
    Registered User Pecado's Avatar
    Join Date
    Sep 2010
    jajaj, thanks a lot men, you guys really care to help .

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Question bout my work
    By SirTalksAlots in forum C Programming
    Replies: 4
    Last Post: 07-18-2010, 03:23 PM
  2. A question about a question
    By hausburn in forum C++ Programming
    Replies: 3
    Last Post: 04-25-2010, 05:24 AM
  3. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 05:51 PM
  4. just a question about the system("cls") command
    By Cmuppet in forum C Programming
    Replies: 8
    Last Post: 08-05-2004, 07:58 PM
  5. Question...
    By TechWins in forum A Brief History of
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM

Tags for this Thread