Non-Type parameters for templates
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/499106/what-does-template-unsigned-int-n-mean">What does template &lt;unsigned int N&gt; mean?</a>  </p>
</blockquote>



<p>Hi ! Are non-type template parameters and constants same ? Do the following code work because template parameter cannot be modified ? If can be modified, the compiler should have thrown error while declaring array "a[T]". Is my understanding correct ?</p>

<pre><code>template &lt; int T &gt; 
void foo() {  
  int a[T] ;  
}  

int main( int argc, const char* argv[] ) {  
  foo &lt;3&gt; () ;  
  system("pause") ;  
  return 0 ;  
}
</code></pre>
