Is there any difference regarding the initialization of the x
member variable in these cases:
struct A {
int x;
A() {}
};
struct B {
int x;
B() : x(0) {}
};
struct C {
int x;
C() : x() {}
};
For all these cases, in the tests I did, x
is always set to the initial value of 0. Is this a guaranteed behavior? Is there any difference in these approaches?