Code:
rectangle::rectangle(int length, int width)
{
int itslength=length;
int itswidth=width;
}
You should not be declaring local variables itslength and itswidth. They end up hiding the member variables.
EDIT:
Actually, in this case it may be better to combine to a single constructor, and declare it inline. You dont need to explicitly declare a destructor.
Code:
class rectangle
{
public:
rectangle(int length = 10, int width = 5) : itslength(length), itswidth(width) {}
int getlength() const {return itslength;}
int getwidth() const {return itswidth;}
private:
int itslength;
int itswidth;
};