title: How to properly use GetModuleFileName?
body: <p>Following code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;Windows.h&gt;
  
  using namespace std;
  
  int main ()
  {   LPWSTR buffer; //or wchar_t * buffer;
      GetModuleFileName(NULL, buffer, MAX_PATH) ;
      cout&lt;&lt;buffer;
      cin.get();
      cin.get();
  
  }
  </code></pre>
  
  <p>Should show the full path where the program executes. But in VS 2012 I get the error:</p>
  
  <blockquote>
    <p>uninitialized local variable 'buffer' used</p>
  </blockquote>
  
  <p>What's wrong in code?</p>