#include class Vector2D { public: Vector2D() : x(0), y(0) { std::cout << "X: default constructor" << std::endl; } Vector2D(const Vector2D& other) : x(other.x), y(other.y) { std::cout << "X: copy constructor" << std::endl; } Vector2D& operator=(const Vector2D& other) { std::cout << "X: assignment operator" << std::endl; x = other.x; y = other.y; return *this; } double x, y; }; int main() { Vector2D a, b, c; c = b = a; }