How to Detect EnterKey in C++

This is simple C++ program to find the key-stoke enter by user. Just Declare a Data Type Char and Print that after taking the input from the User.

Source Code 

#include<iostream>
using namespace std;
int main ()
{
 char a;
 cout<<" Press a Key ";
 cin>>a;
 cout<<" You Press " <<a;
 return 0;
}

Output of the Program


c++ Programming
Share on Google Plus

About Asad

Asad Niazi is Software Engineer , Programmer, Web Developer and a young mentor of BloggersTown and PProgramming. Asad Love to writes about Technology, Programming, Blogging and make money online.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment