How to get single character input without pressing return

This is a discussion on How to get single character input without pressing return within the C++ Programming forums, part of the General Programming Boards category; Can someone tell me how I can get a single character input from the keyboard, without needing to press enter? ...

  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    13

    How to get single character input without pressing return

    Can someone tell me how I can get a single character input from the keyboard, without needing to press enter? I want to get i/p from the arrow keys.

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Which platform? There is no standard way.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Registered User
    Join Date
    Oct 2006
    Posts
    13
    XP. Using Visual C++ Express, Win32 Console Application.

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,434
    Oh you mean like the one in the FAQ?
    http://faq.cprogramming.com/cgi-bin/...&id=1043284392
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
    Registered User
    Join Date
    Oct 2006
    Posts
    13
    Quote Originally Posted by Salem
    Oh you mean like the one in the FAQ?
    http://faq.cprogramming.com/cgi-bin/...&id=1043284392
    Yes, just like that one. It wouldn't be a FAQ if no body asked it now would it

  6. #6
    Registered User
    Join Date
    Jul 2006
    Posts
    162
    Yes, just like that one. It wouldn't be a FAQ if no body asked it now would it
    But that's exactly why there is a FAQ, someone already asked. So check and see what was already asked.


  7. #7
    Registered User
    Join Date
    Oct 2006
    Posts
    13
    Do you know how many C++ faqs there are on the web. If I'd had known which one the answer I was looking for I would have read it.
    I'm greatful for the pointer to this one. Thanks Salem.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. New string functions
    By Elysia in forum C Programming
    Replies: 11
    Last Post: 03-28-2009, 05:03 AM
  2. Replies: 8
    Last Post: 03-10-2008, 11:57 AM
  3. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 01:53 AM
  4. C++ FTP class won't work
    By lord mazdak in forum C++ Programming
    Replies: 8
    Last Post: 12-18-2005, 06:57 AM
  5. opengl program as win API menu item
    By SAMSAM in forum Game Programming
    Replies: 1
    Last Post: 03-03-2003, 06:48 PM

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