I have a class with an anonymous struct:
class foo {
struct {
float x;
float y;
float z;
};
};
I create two objects of this class:
obj1 = {1, 2, 3};
obj2 = {2, 3, 4};
Then I want to know if all the variables of obj2
's anonymous struct are greater than the corresponding variables of the anonymous struct of obj1
.
Is there an easy way to do this apart from directly comparing each pair of variables and some macro stuff?