Question: error: out-of-line definition of '(method)' does not match any declaration in 'Rectangle' #include using namespace std ; class Rectangle { public : private : double

error: out-of-line definition of '(method)' does not match any declaration in 'Rectangle'

#include  using namespace std; class Rectangle { public: private: double length; double width; }; void Rectangle::setWidth(double wid) { width = wid; } double Rectangle::getLength() { return length; } double Rectangle::getWidth() { return width; } double Rectangle::calculateArea() { double l1; double w1; double a1; l1 = getLength(); w1 = getWidth(); a1 = l1 * w1; return a1; } double Rectangle::calculatePerimeter() { double l1; double w1; double a1; l1 = getLength(); w1 = getWidth(); a1 = 2 * (l1 + w1); return a1; } /* Excuse my lack of knowledge on this, I am fairly new. */ 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!