Hi,
In my code I have the following constructors for my class Point:
Code:
Point();
Point(float x, float y, float z);
The first, instantiates a point at the origin, and the other instantiates a point at the (x, y, z) coordinates. I've got a method called move(float x, float y, float z) that translates the point to the given coordinates.
I've tried doing this:
Code:
Point(float x, float y, float z)
{
Point();
move(x, y, z);
}
But it didn't work. So, how can I do it? Is it possible for a contructor to call another constructor like this?
Thanks.