Possible Duplicate:
What does template <unsigned int N> mean?
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 ?
template < int T > void foo() { int a[T] ; } int main( int argc, const char* argv[] ) { foo <3> () ; system("pause") ; return 0 ; }