I defined a class template like this:
template <class I> class MyTemp
{
I* i;
public:
MyTemp(I j=0) { i = new I; *i = j; }
~MyTemp() { delete i; }
};
and a class B like this:
class B
{
int i;
public:
B(): i(0) {}
B(int j): i(j) {}
};
when I try to do this: MyTemp<B> b; I receive a compiler error.
Can anyone explain me why?
Thanx for every help.
Paolo.