pushing any key and ....

This is a discussion on pushing any key and .... within the C++ Programming forums, part of the General Programming Boards category; hi. is there any function that when u push a key then it says which key u had pushed ? ...

  1. #1
    Registered User
    Join Date
    Nov 2003
    Posts
    177

    Unhappy pushing any key and ....

    hi.
    is there any function that when u push a key then it says which key u had pushed ?
    it must be done for all keys in keyboard (a...z & 1...9 & all other keys like f1,f2,... & ctrl &...)
    for example when u push (a) it says (a)
    or when u push f1 it says f1 and so on .
    and if there is no function for doing that , can u plz help me a little to writting that program .
    tnx arian

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    Check the FAQ. It should be enough to get you well on your way.
    My best code is written with the delete key.

  3. #3
    Registered User
    Join Date
    Nov 2003
    Posts
    177
    tnx for such a fast help .
    I almost understand the program .
    now my question is : is there any function in c++ for doing that ?

  4. #4
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856
    There's nothing standard to C++ for such operations, however, depending on the implementation you are using, you can use conio.h to read a key pressed or if using windows.h you can use some other stuff to do the same. Read thru the FAQ.

  5. #5
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >is there any function in c++ for doing that ?
    That function was C++, what more do you want? If you want something 100% standard and portable then forget it. The C++ standard doesn't know what a keyboard is.
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 11-23-2007, 01:48 PM
  2. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 10:00 AM
  3. Directional Keys - Useing in Console
    By RoD in forum C++ Programming
    Replies: 38
    Last Post: 10-06-2002, 05:42 PM
  4. FAQ: Directional Keys - Useing in Console
    By RoD in forum FAQ Board
    Replies: 38
    Last Post: 10-06-2002, 05:42 PM

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