USING C++
*** Rectangle Class ***
Rectangle.hclass Rectangle{private:double width;double length;char* name;void initName(char* n);public:Rectangle();Rectangle(double, double,char*);//Copy ConstructorRectangle(Rectangle&);~Rectangle();Rectangle& operator=(const Rectangle&);...};
****End of Rectangle Class****
****Overloaded = operator, returns a rectangle by reference****
Rectangle.cpp
Rectangle& Rectangle::operator=(const Rectangle& r){length = r.length;width = r.width;strcpy(name, r.name);return *this;}
*** End of overloaded operators***
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here