Thread: going back a line in console and 128 character limit

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    380

    going back a line in console and 128 character limit

    You know when you're typing and the cursor advances to the next line and say you would like to go back and correct an error. How would you make this possible in the windows console?

    Also, how do you get around the 128 character limit? I'm allowing input to be limited to 300 characters.

    I'm using Borland C++ 4.5 as my compiler.
    Don't you dare hit me on the head, you know I'm not normal.
    A Stooge Site
    Green Frog Software

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    There a many different ways of getting console input. Don't limit yourself to just one. Check out the FAQs.
    gg

  3. #3
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Use a compiler specific method for reading keystrokes. Read each keystroke at a time directly and put it all in a buffer. Test for backspace, and if it is encoutnered, back up one space in your buffer. This way there is no limit on input.

    The curses library or something similar would allow manipulation of the cursor.

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

Popular pages Recent additions subscribe to a feed