Thread: kbhit

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    39

    Question kbhit

    i want my simulation program to run 100 times but i want to display my changed contents at every time,until "enter" is pressed.i have heard something like kbhit and getch.how can i implement that?

  2. #2
    Unregistered Leeman_s's Avatar
    Join Date
    Oct 2001
    Posts
    753
    you would do something like this:

    if( kbhit() )
    keypress=_getch()

    i think.....

    click here to see an example http://<br /> <a href="http://www.c...adid=15433</a>

  3. #3

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 11-30-2007, 09:46 AM
  2. kbhit() for enter key? not working
    By yahn in forum C++ Programming
    Replies: 4
    Last Post: 04-03-2006, 02:44 AM
  3. implicit declaration of int kbhit(...);
    By Blizzarddog in forum C++ Programming
    Replies: 14
    Last Post: 11-13-2003, 05:39 PM
  4. Pausing for input, with kbhit() still detecting keys
    By Da-Spit in forum C++ Programming
    Replies: 5
    Last Post: 05-23-2002, 05:04 AM
  5. need more help on kbhit()
    By lordvlaad() in forum C++ Programming
    Replies: 0
    Last Post: 04-20-2002, 02:07 AM