Simple C++ Function to detect Enter Key Pressed.
// low-level.cpp
#include <iostream>
int main()
{
cout << "Programe will continue... untill Enter key press";
if (cin.get() == '\n')
cout << "Good job.\n";
else
cout << "bye bye..........";
return 0;
}
#include <iostream>
int main()
{
cout << "Programe will continue... untill Enter key press";
if (cin.get() == '\n')
cout << "Good job.\n";
else
cout << "bye bye..........";
return 0;
}
Comments
Post a Comment