template <class S>
class Price{
public:
Price(double p) : p_(p)
{
check(p);
}
Price(const Price<S>& p) : p_(p.p_){}
double price() const {
return p_;
}
Price<S>& operator = (double p)
{
check (p); p_ = p; return *this;
}
Price<S>& operator = (const Price<S>& p)
{
p_ = p.p; return *this;
}
private:
Im trying to find an answer on the internet but unfortunately im lost. Cause i dont know how to describe it. thanks in advance