struct Vector2f {
    float x, y;  
};

struct Rect {

   union {
       Vector2f pos;
       struct {
           float x,y;
       };
   };
   union {
       Vector2f size;
       struct {
           float width, height;
       };
   };

};

#include <iostream>
using namespace std;
int main() {
    
    Rect rect;
    rect.x = 10;
    rect.y = 20;
    cout << rect.pos.x << " " << rect.pos.y << endl;
    
}