You have a simple struct, say:
typedef struct rect
{
int x;
int y;
int width;
int height;
}
rect;
And you want to multiply
Not really. Programatically obtaining a list of the elements of a struct requires reflection, which C++ does not support.
Your two options are to just give the struct a method that does this the long-winded way and then use that method in all other places, or to manually mimic reflection, for example by giving the struct another element which is an array of pointers to all of its other elements (built within the struct's constructor), and then looping over that to perform the scaling function.