Suppose I have a template class:
is it possible to instantiate the template class with a variable in the second paramter?Code:template<class A, int B> class foo { ..... }
int variable=99;
foo<apples, variable> foo1=new foo();
, where apples is a class.
My compiler doesn't let me do it as above; it requires the second parameter to be a constant.
Thanks.