Thread: Getting user input without echo to terminal

  1. #1
    Registered User
    Join Date
    Apr 2004
    Posts
    1

    Getting user input without echo to terminal

    Is there a function in c or c++ where it is like a scanf or cin but instead of echoing the user input it you just record the keystrokes.

    What I want to do is get the user input and put it in a small character array with out the echo.

    Thanks for any help guys

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Yes, you can. There is no standard input function to do so however. It is OS and compiler dependant. If you use a *nix variety, consider the curses library. Otherwise, you'll have to look up some WinAPI, or perhasp some DOS-ish conio functions. (For example, getch isn't supposed to echo by definition, which is why they have getche.)

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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Checking array for string
    By Ayreon in forum C Programming
    Replies: 87
    Last Post: 03-09-2009, 03:25 PM
  2. Structure and Linked List User Input Question
    By kevndale79 in forum C Programming
    Replies: 16
    Last Post: 10-05-2006, 11:09 AM
  3. ~ User Input script help~
    By indy in forum C Programming
    Replies: 4
    Last Post: 12-02-2003, 06:01 AM
  4. A breakthrough
    By loopy in forum Linux Programming
    Replies: 4
    Last Post: 11-26-2003, 06:46 PM
  5. comparing user input
    By lambs4 in forum C Programming
    Replies: 5
    Last Post: 12-15-2002, 10:28 AM