How would you change the same member of many objects of the same class (or structure if possible)?
struct point
{
float x, y, z;
}
point a, b, c;
a.x += 20; //
b.x += 20; // now how would i do this in one statement?
c.x += 20; //
I don't see how inheritance or polymorphism would apply, and as far as I know they don't work with structures anyway, and I really have no need of classes. So how would I change all point::x members universally regardless of how many or what objects use it?