I don't know how to name these things properly. I want to create a class, declare and define it's constructor with a variable and default value. I figured out that both these ways work. But what's the difference? Is one of them correct or both are good?
class Box
{
public:
int size;
Box() {size = 6;};
};
class Box
{
public:
int size;
Box(): size(6) {};
};