Invalid arguments ' in c++ : when i try to use get functions that I built i get that error .
here is an example from my code :

        class Apartment{
    public :
    	class ApartmentException : public std::exception {};
    	class IllegalArgException : public ApartmentException {};
    	class OutOfApartmentBoundsException : public ApartmentException {};
    
    	enum SquareType {EMPTY, WALL, NUM_SQUARE_TYPES};
    
    	Apartment (SquareType** squares, int length, int width, int price);// done
    	Apartment (const Apartment& apartment); // done
    	~Apartment(); // done
    
    
    	Apartment& operator+=(const Apartment& apartment);// done
    	Apartment operator+(const Apartment& apartment1,const Apartment& apartment2);//done
    	Apartment& operator=(const Apartment& apartment); // need check
    	Apartment& operator=(SquareType** squares, int length, int width, int price);
    	SquareType& operator()(int row , int col); // done - need help
    	bool operator<(const Apartment& apartment); // done - need help
    
    	int getTotalArea(); // done
    	int getPrice(); // done
    	int getLength(); // done
    	int getWidth(); // done
    
    	private:
    	void legalArgs(SquareType** squares, int length, int width, int price);
    	void createSquares(SquareType** squares,int length,int width);
    	void copySquares(SquareType** squares,int length,int width);
    	void destroySquares(SquareType** squares,int length,int width);
    	void legalCoordinate(int row,int col);
    	int price;
    	int length;
    	int width;
    	SquareType** squares;
    
    };


    int Apartment::getLength()
    {
    	return length;
    }
    int Apartment::getPrice()
    {
    	return price;
    }
    int Apartment::getWidth()
    {
    	return width;
    }
    int Apartment::getTotalArea()
    {
    	int count=0;
    	for(int i=0;i<width;i++)
    	{
    		for(int j=0;j<length;j++)
    		{
    			if(squares[i][j]==EMPTY)
    			{
    					count++;
    			}
    		}
    	}
    	return count;
    }

    bool Apartment::operator<(const Apartment& apartment)
    {
    	int thisArea=this->getTotalArea();
    	int paramArea=apartment.getTotalArea(); // the error line is here !!!
    	double thisRatio=((double)price)/thisArea;
    	double paramRatio=((double)apartment.price)/paramArea;
    	if(thisRatio==paramRatio)
    	{
    		return price < apartment.price;
    	}
    	return thisRatio<paramRatio;
    
    }

have i done something wrong ? Its the first time i'm using c++ ..
by the way - any comments for the rest of the code are fine as well.