c++ - request for member 'scale' in '((Circle*)this)->Circle::_radius', which is of non-class type 'double'| -



c++ - request for member 'scale' in '((Circle*)this)->Circle::_radius', which is of non-class type 'double'| -

void circle::scale(const point& center, double s) { _radius = _radius.scale(center, s); }

can explain me why not work? error get. request fellow member 'scale' in '((circle*)this)->circle::_radius', of non-class type 'double'

class circle : public shape { public: circle(point center, double radius, color edgecolor=color::black, color fillcolor=color::transparent); virtual void scale(const point& center, double s); virtual void translate(double x, double y); virtual void draw(graphics& g) const; virtual void fill(graphics& g) const; virtual void print(std::ostream& os) const; virtual shape* clone() const {return new circle(*this);} virtual rectangulararea boundingbox() const; virtual void get(std::istream& in); private: point _center; double _radius; };

did check homecoming type of 'scale' function? first of all, it's void function, doesn't homecoming anything. here want give _radius value 'scale' returns... and,also, it's fellow member function, must called circle object, , you're calling double... hope helped you

c++

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -