// Our Vector2 Vector2 vec{1, 2}; // The first element of the vector randomFunctionA(vec.x); // and the second element of the vector randomFunctionB(vec.y); // The same goes for a vector3 but you use a z for the third element