title: Compiler error when creating a KeyBoard Hook
body: <p>I am introducing myself to using Hooks in Win32 C++ (specifically KeyboardHooks) &amp; I have an issue &amp; a question.</p>
  
  <p>First off, I am trying to just create/declare a HHook object, but when I do Microsoft Visual C++ gives a compiler error saying:  </p>
  
  <pre><code>c:\users\soribo\desktop\c++ programming\visual c++ programming\testhhook\testhhook\testhhook.cpp(7): error C2146: syntax error : missing ';' before identifier 'keyboardHook'
  
  1&gt;c:\users\soribo\desktop\c++ programming\visual c++ programming\testhhook\testhhook\testhhook.cpp(7): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
  
  1&gt;c:\users\soribo\desktop\c++ programming\visual c++ programming\testhhook\testhhook\testhhook.cpp(7): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
  </code></pre>
  
  <p>This is the line of code that generates this error: </p>
  
  <pre><code>HHook keyboardHook; 
  </code></pre>
  
  <p>What windows library do I need to include to use the HHook class? I have done   </p>
  
  <pre><code>#include &lt;windows.h&gt;
  </code></pre>
  
  <p>My other question is, to use these hooks do I need UAC?</p>
  
  <p><strong>EDIT: With more code:</strong></p>
  
  <pre><code>// TestHHook.cpp : Defines the entry point for the application.
  //
  
       #include &lt;windows.h&gt;
  #include "stdafx.h"
  #include "TestHHook.h"
  
  static HHook keyboardHook;
  #define MAX_LOADSTRING 100
  
  // Global Variables:
  HINSTANCE hInst;                                // current instance
  TCHAR szTitle[MAX_LOADSTRING];                  // The title bar text
  TCHAR szWindowClass[MAX_LOADSTRING];            // the main window class name
  
  // Forward declarations of functions included in this code module:
  ATOM                MyRegisterClass(HINSTANCE hInstance);
  BOOL                InitInstance(HINSTANCE, int);
  LRESULT CALLBACK    WndProc(HWND, UINT, WPARAM, LPARAM);
  INT_PTR CALLBACK    About(HWND, UINT, WPARAM, LPARAM);
  </code></pre>