Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions