Thread: Is there a function in C++ to read a single char?

  1. #1
    The Autodidact Dante Wingates's Avatar
    Join Date
    Apr 2010
    Location
    Valhalla
    Posts
    56

    Question Is there a function in C++ to read a single char?

    Its something very simple to do in assembly language, and I know there is a function to do just that in C++, but I just cant remember which one...


    Its not getchar(), nor it is cin.get().. And Im not talking about fgetc() or getc() either... Its something like getch() in conio.h... Anyway the question is: is there a function similar to getch()? I cant remember a way to read a single char like getch()...

  2. #2
    Registered User
    Join Date
    Mar 2009
    Posts
    399
    There is no standard way of getting unbuffered input in C/C++. You'll have to use operating system or compiler specific extensions like getch().

  3. #3
    The Autodidact Dante Wingates's Avatar
    Join Date
    Apr 2010
    Location
    Valhalla
    Posts
    56
    Ok, thank you for the help

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. The UNIX System Interface
    By rrc55 in forum C Programming
    Replies: 1
    Last Post: 10-20-2009, 05:56 PM
  2. newbie needs help with code
    By compudude86 in forum C Programming
    Replies: 6
    Last Post: 07-23-2006, 08:54 PM
  3. Replies: 28
    Last Post: 07-16-2006, 11:35 PM
  4. Half-life SDK, where are the constants?
    By bennyandthejets in forum Game Programming
    Replies: 29
    Last Post: 08-25-2003, 11:58 AM
  5. qt help
    By Unregistered in forum Linux Programming
    Replies: 1
    Last Post: 04-20-2002, 09:51 AM