There are two structures that implement the geometric concepts of a point and a vector. To initialize the vector requires two points. Similarly, there is an operation of addition of a point and a vector through operator + overload. The compiler curses the absence of a Vector structure in overload, which is understandable, since it is implemented after. How to pre-declare a Vector structure. (struct Vector;) does not work. Or here is the error of the ad logic itself.
struct Vector; struct Point { int X; int Y; [***] Point operator + (const Vector& ab) { this->X += ab.X; this->Y += ab.Y; return *this; } }; struct Vector { int X; int Y; [***] Vector(Point& a, Point& b) { X = bX - aX; Y = bY - aY; } };