S
Shahin Tavakoli
Hi,
I'd like to put a static member in a template class, but I don't know
the syntax. I've tried out
template<typename Type> class Stocker : private vector<Type>
{
public:
static int NB;
};
int Stocker<double>::NB(5);
int main()
{
cout << Stocker::NB << endl;
return 0;
}
but it doesn't work, it gives me
error: too few template-parameter-lists
could someone please help me out?
thanks a lot!
Shahin
I'd like to put a static member in a template class, but I don't know
the syntax. I've tried out
template<typename Type> class Stocker : private vector<Type>
{
public:
static int NB;
};
int Stocker<double>::NB(5);
int main()
{
cout << Stocker::NB << endl;
return 0;
}
but it doesn't work, it gives me
error: too few template-parameter-lists
could someone please help me out?
thanks a lot!
Shahin