When creating struct or classes, usually attributes don't have a specific value at all, and when they call the constructor, they assign the values that they want.
struct Point{
int x;
int y;
}
Point myPoint = {0,0};
However when is appropriate the following case?
struct Point{
int x = 0;
int y = 0;
}
I'm in some sort of way trying to specify the default values of each attribute, then change it when necessary
Point center; //This is (0,0) by default
Point myPoint;
myPoint.x = 7;
myPoint.y = 14;
Also, are these approaches valid when working with classes?