In need of help with basic input-output

This is a discussion on In need of help with basic input-output within the C Programming forums, part of the General Programming Boards category; Hi, I need some help with basic input-output Is there a command that clears all the text from the screen? ...

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    1

    In need of help with basic input-output

    Hi,
    I need some help with basic input-output

    Is there a command that clears all the text from the screen?
    But not clrscr();, cause I only want to delete the text...

    I know that when using printf writing \n makes the program go down a line.
    Is there a command to make it go up a line?

    And last, is there a way to use scanf/another command to get input in a specific x,y?
    Like, say, a textbox?
    cause I want the user to be able to input text but not at the top of the screen...

    thanks in advance

    Adam

  2. #2
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459

  3. #3
    and the hat of copycat stevesmithx's Avatar
    Join Date
    Sep 2007
    Posts
    494
    But I suspect that the OP wants it for a DOS based system as he mentioned clrscr() function.
    Edit:
    Pdcurses seems to fit there.
    Last edited by stevesmithx; 01-31-2009 at 06:35 AM.
    Not everything that can be counted counts, and not everything that counts can be counted
    - Albert Einstein.


    No programming language is perfect. There is not even a single best language; there are only languages well suited or perhaps poorly suited for particular purposes.
    - Herbert Mayer

  4. #4
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    If you use Windows, it has API's to do all these things. In a DOS compiler, the commands to look for are things like:

    wherex - gives the column cursor position in the current text window
    wherey - gives the row cursor position in the current text window

    gotoxy(x,y) - moves the cursor to the stated row and column position

    window(n,n,n,n) - creates a text window at this position, with this size in rows and columns

    cprintf() - does a better job of printing into these special text area's, especially with colors.

    I haven't seen a "text scroll down" function for a window, but obviously you can program a function to do that. May not be easy, but text editors do it all the time.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. can someone help me with these errors please code included
    By geekrockergal in forum C Programming
    Replies: 7
    Last Post: 02-10-2009, 01:20 PM
  2. Bad output -- possible input buffer problems
    By jake123 in forum C Programming
    Replies: 8
    Last Post: 02-18-2008, 02:36 PM
  3. Need some help with C program writing
    By The_PC_Gamer in forum C Programming
    Replies: 9
    Last Post: 02-12-2008, 08:12 PM
  4. Basic C Programming Help Needed
    By Smurphygirlnz in forum C Programming
    Replies: 8
    Last Post: 09-26-2002, 07:12 PM
  5. basic input and output with printf and fgets
    By Unregistered in forum C Programming
    Replies: 10
    Last Post: 08-01-2002, 11:02 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21