Unfortunately, I have faced a challenge since I can't use abstraction and templates simultaneously. The idea is to keep the parent class as general as possible so we put the general form of two member functions as an abstraction in the parent class. Then, I wanted to define these functions in the child class how I wanted them to be. But the problem arises when I want to keep the parent template not even after the declaration of child class not make it as soon as I go to the child class. Please someone show me a solution if there are any?
template <class y2>
class parrennt
{
public:
y2 numb;
virtual y2 funcc3()=0;
virtual y2 funcc4()=0;
};
template <class y2>
class chilld : public parrennt <double> // I want to keep it <class y2> if its possible
{
public:
virtual y2 funcc3 () { return numb*2;}
virtual y2 funcc4 () { return numb*3;}
};