Thread: Time for another Beginner Q: equivalent to C's getc in C++

  1. #1
    Johan
    Guest

    Question Time for another Beginner Q: equivalent to C's getc in C++

    Hi!

    In C++ I would like to scan the keyboard if a key is pressed without having to press the ENTER-key. This was possible in C using "c=getc()" which didn't wait for the ENTER-key, but I cannot find anything similar in C++.

    Can somebody help me with this?

    Thanks
    Johan

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    getch() was in C as well.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    Johan
    Guest
    sorry, I meant c=getch...:-) and if I remember correctly "getche" echoed the input out to the screen.

    /Johan

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Execution Time - Rijandael encryption
    By gamer4life687 in forum C++ Programming
    Replies: 5
    Last Post: 09-20-2008, 09:25 PM
  2. I apologize. Good bye.
    By doubleanti in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 05-03-2002, 06:51 PM
  3. Is this really true or it's just science fiction?
    By Nutshell in forum A Brief History of Cprogramming.com
    Replies: 145
    Last Post: 04-09-2002, 06:17 PM
  4. time class
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 12-11-2001, 10:12 PM
  5. relating date....
    By Prakash in forum C Programming
    Replies: 3
    Last Post: 09-19-2001, 09:08 AM