title: Unresponsive program with displaying a pressed key and using 'q' to exit program
body: <p>I am following a tutorial video on how to make a very simple game using C++.  I am very early in the tutorial and I had no issues until now.  Accourding to the video when I run the program it should display any key I press with "Here's what you pressed: (pressed key goes here)".  Also, it should exit the program when I press the Q key.  On the video it works fine, but sadly on my screen it is just a blank DOS prompt that does not respond to anything.  Can anyone please look at what I got so far and see if there is a way to troubleshoot this issue.  Again, I am new at this so any help would be greatly appreciated.  Perhaps there is a header missing or something...</p>
  
  <p><strong>game.cpp</strong></p>
  
  <pre><code>#include &lt;iostream&gt;    //Include this and namespace in all files.
  using namespace std;
  
  #include "game.h"
  #include &lt;conio.h&gt;
  
  bool Game::run(void)
  {
  char key = ' ';
  
  while (key != 'q')
  {
      while (!getInput(&amp;key))
      {
      }
  
      cout &lt;&lt; "Here's what you pressed: " &lt;&lt; key &lt;&lt; endl;
  }
  
  cout &lt;&lt; "End of the game" &lt;&lt; endl;
  return true;
  }
  
  bool Game::getInput(char *c)
  {
  if (kbhit())
  {
      *c = getch();
  }
  
  return false;
  }
  </code></pre>
  
  <p><strong>game.h</strong></p>
  
  <pre><code>#ifndef GAME_H //Make sure this accompanies #endif.
  #define GAME_H
  
  class Game
  {
  public:
  bool run (void);
  
  protected:
  bool getInput (char *c);
  void timerUpdate (void);
  };
  
  #endif //Make sure this accompanies #ifndef.
  </code></pre>
  
  <p><strong>main.cpp</strong></p>
  
  <pre><code>#include "game.h"
  
  
  int main ()
  {
  Game gameHeart;
  
  gameHeart.run();
  
  return 0;
  //system("pause");
  }
  </code></pre>