Hello i have one class created by me: Point. I want to create another class triangle and want to use point objects for vertexes of triangle, so I want to create in class triangle 3 points.
1 2 3 4 5 6 7
class Triangle
{
Point v1 = Point();
Point v2 = Point();
Point v3 = Point();
};
this is my code but compiler says: only static const integral data members can be initialized within a class.
Why they should be static const? I want to change them with constructors and so on how to do that? I don't want them to be const.