The following code works on my machine, but is it good practice / guaranteed to work?
struct MyStruct {
MyStruct(int x, int y, int z) :
x(x),
y(y),
z(z) {
}
int x;
int y;
int z;
};
Specifically, is x(x) guaranteed to do what I want? (that is, does the variable in an initialization list always look at that struct/class' member?)
I don't want to use leading or trailing underscores since x is a public member of the struct.
Thanks!
:-/