Вызов функции у аргумента, переданного в функцию как константная ссылка

Рейтинг: 1Ответов: 1Опубликовано: 07.03.2011
struct point
{
public:
   point(double x, double y)
   {
      x_ = x;
      y_ = y;
   }

   const double get_x()
   {
      return x_;
   }

   const double get_y()
   {
      return y_;
   }

private:
   double x_, y_;
};

point point_to_vector(const point& begin, const point& end)
{
   return point(end.get_x() - begin.get_x(), end.get_y() - begin.get_y());
}

VS2010 ругается:

error: the object has qualifiers that are not compatible with the member function

Объясните, что не так.

Ответы

Ответов пока нет.