error: no matching function for call to 'rectangle::perimeter()'
This error means that it cannot find a function perimeter(), in the rectangle class, which you are trying to call here: cout<< "Perimeter = " << perimeter();
in the function void rectangle::showdata(), which you called here: recObj.showdata();
So, we look at the rectangle class. What do we see? We see a function rectangle::perimeter(float l, float w), but we don't see one rectangle::perimeter(). Perhaps you meant to call rectangle::perimeter(float l, float w)? Well, that function takes in two parameters, so you have to supply them when you call the function.