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;
  }

Comments

Popular posts from this blog

Linear Search in C++

Advance Calculator in JavaScript