You create a Point object, and you then create a Circle object which has inside it a whole other Point object.
That's two independent Point objects in existence. Your code creates two Point objects, which is pretty much the minimum needed in order to have two independent Point objects.
Whether you create the second one by copying an existing one, or some other way, you're still going to have to create two of them.
yes, ¿but what if you don't need two points?Circle c(Point(1, 1), 1);
I was hoping that Circle(Point center, constdouble& radius) would construct just one point, namely c.m_menter
sadly, that doesn't work.
as an alternative, you may do Circle(double x, double y, double radius): m_center(x, y) but then the instantiation becomes less clear Circle c(1, 1, 1);
Point is not big, so the copy is not too expensive, but also it is not needed.
If you are intending to be able to move that point (for example, in a CAD package) and if you intend the circle to automatically follow the change of centre then there is some merit in m_center being a pointer, not a fixed variable.