title: error: expected expression before 'unsigned'
body: <p>Working with <strong>.wav</strong> file...
  *ptr_8 and *ptr_16 - pointers to the arrays of samples. </p>
  
  <p>I want make the program to declare these pointers depending on header's data (if 8 bitsPerSample --->  declare *ptr_8...)</p>
  
  <pre><code>if ( hdr.S1.BitsPerSample == 8 )        // Declaring array for samples. Depending
                                          // on header's data (8 or 16 bits).
      unsigned char *ptr_8;
  else
      if ( hdr.S1.BitsPerSample == 16 )
          unsigned short *ptr_16;
  </code></pre>
  
  <p><strong>The problem</strong> is that it writes:</p>
  
  <pre><code>error: expected expression before 'unsigned'
  </code></pre>
  
  <p>to the both lines (where <code>*ptr_8</code> and <code>*ptr_16</code> must be declared) though I don't see the reason of such kind of behaviour. 
  Tell me what is wrong, please.</p>
  
  <hr>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>As it turned out, <em>declaration is a compile-time concept</em> (see accepted answer below).</p>
  
  <p>Variables have being declared while compiling so it takes the machine's resourses once and then (when you have compiled application) they are all already declared there. It means that it was one of the worst ways of trying to optimize program...</p>