1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

data from input device

Discussion in 'C++' started by AlsoPenCover, Dec 13, 2007.

  1. AlsoPenCover

    AlsoPenCover New Member

    Joined:
    Dec 13, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    hey guys how do you get data from an input device????


    thanks :D
     
  2. jsh

    jsh New Member

    Joined:
    Mar 18, 2011
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    Hi.
    -------
    Code:
    #include<iostream.h>
    #include<conio.h>
    
    void main()
    {
       char ch=getch(); // cin.get()  or getche();
       cout << ch <<" = "<< (int ) ch;
       getch();
    }
    
     

Share This Page