I got an error (It says the Euro_call is inaccessible) when I try to initialize the derived class. Is there any way to fix the error without significant change of the code? I welcome any advice.
class Euro{
protected:
double S; // spot price
public:
Euro(const double&);
~Euro(){};
};
Euro::Euro(const double& _s):S(_s){}
class Euro_call:public Euro{
public:
Euro_call(const double&);
~Euro_call(){};
};
Euro_call::Euro_call(const double& _s):Euro(_s){};
class main{
Euro_call a(2.0);
}