Mega Code Archive
Use class as the member function parameter type
#include
#include
class Rectangle
{
private:
float length;
float height;
public:
Rectangle(){}
Rectangle(float loge,float shge)
{
length=loge;
height=shge;
}
void getlength()
{
cout<<"Input large edge:";
cin>>length;
cout<<"Input small edge:";
cin>>height;
}
void showsquare()
{
cout<