Реферат: Объектно ориентированое програмирование на С
#define conrectangle__h
#include <iostream.h>
#include "rectangle.h"
rectangle::rectangle()
{
cout<<"The constructor \"rectangle()\" worked.\n";
a=1.0;
b=1.0;
};
rectangle::rectangle(double x, double y)
{
cout<<"The constructor \"rectangle(double, double)\" worked.\n";
a=x;
b=y;
};
rectangle::~rectangle()
{
cout<<"The destructor \"~rectangle()\" worked.\n";
a=0.0;
b=0.0;
};
rectangle & rectangle::operator=(const rectangle & x)
{
if(this==&x) return *this;
this->a=x.a;
this->b=x.b;
return *this;
};
double rectangle::square(void)