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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice