title: Function and declaring a local variable
body: <p>Just having an conversation with collegue at work how to declare a variables.
  For me I already decided which style I prefer, but maybe I wrong.</p>
  
  <p><strong>"C" style</strong> - all variable at the begining of function. 
  If you want to know data type of variable, just look at the begining of function.</p>
  
  <pre><code>bool Foo()
  {
      PARAM* pParam = NULL;
      bool rc;
  
      while (true)
      {
         rc = GetParam(pParam);
         ... do something with pParam
      }
  }
  </code></pre>
  
  <p><strong>"C++" style</strong> - declare variables as local as possible. </p>
  
  <pre><code>bool Foo()
  {       
      while (true)
      {
          PARAM* pParam = NULL;
  
          bool rc = GetParam(pParam);
         ... do something with pParam
      }
  }
  </code></pre>
  
  <p>What do you prefer?</p>
  
  <p><strong>Update</strong> 
  The question is regarding POD variables.</p>