Thread: moving up a line or more

  1. #1
    Registered User
    Join Date
    Jul 2007
    Location
    Texas
    Posts
    103

    moving up a line or more

    Ok, so I asked a question about refreshing a number, but you guys gave me an answer that was just to use.

    printf("\b");

    Which was fine, but now I want to know if there is a way to move back up a line or more (similar to \r returns you to the beginning). So does anyone know of a way to do that??

  2. #2
    Registered User
    Join Date
    Jul 2007
    Location
    Texas
    Posts
    103
    I wasn't very clear on that... let me help

    if I did this

    printf("blah1\n");
    printf("blah2\n");
    printf("blah3\n");

    Since blah3 was the last thing printed, is there a way to get back up to blah 1 or 2 to possibly use the printf("\b"); to edit it?

  3. #3
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    Either you have to use OS dependant code, or Curses to do things like that, most likely neither is worth it for your project.

  4. #4
    Registered User
    Join Date
    Jul 2007
    Location
    Texas
    Posts
    103
    oh thats a pain

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Reading a buffer line by line, while using system read
    By Hammad Saleem in forum C Programming
    Replies: 9
    Last Post: 05-27-2008, 05:41 AM
  2. line number on a rich edit control
    By rakan in forum Windows Programming
    Replies: 1
    Last Post: 02-18-2008, 07:58 AM
  3. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM
  4. SSCANF help
    By mattz in forum C Programming
    Replies: 7
    Last Post: 12-10-2001, 04:53 PM
  5. Validating the contents of a char buffer
    By mattz in forum C Programming
    Replies: 3
    Last Post: 12-09-2001, 06:21 PM