You have a simple struct, say:
typedef struct rect
{
int x;
int y;
int width;
int height;
}
rect;
And you want to multiply
A solution via a new class:
template class Array
generic array, (see how),*
operator for a type if necessary / create a specific method for that object)multiply
that performs a loop on the array and multiplies each element by a given value.