typedef struct
{
float left;
float top;
float width;
float height;
} sfFloatRect;
sfFloatRect sfFloatRect_set(float top, float left, float width, float height){
sfFloatRect floatRect;
floatRect.top = top;
floatRect.left = left;
floatRect.width = width;
floatRect.height = height;
return floatRect;
}
int main()
{
sfFloatRect floatRect;
// throws error: request for member top in something not a structure or union
floatRect.top = sfFloatRect_set(1,1,1,1).top;
}
CnR5cGVkZWYgc3RydWN0CnsKICAgIGZsb2F0IGxlZnQ7CiAgICBmbG9hdCB0b3A7CiAgICBmbG9hdCB3aWR0aDsKICAgIGZsb2F0IGhlaWdodDsKfSBzZkZsb2F0UmVjdDsKCnNmRmxvYXRSZWN0IHNmRmxvYXRSZWN0X3NldChmbG9hdCB0b3AsIGZsb2F0IGxlZnQsIGZsb2F0IHdpZHRoLCBmbG9hdCBoZWlnaHQpewogICAgc2ZGbG9hdFJlY3QgZmxvYXRSZWN0OwoKICAgIGZsb2F0UmVjdC50b3AgPSB0b3A7CiAgICBmbG9hdFJlY3QubGVmdCA9IGxlZnQ7CiAgICBmbG9hdFJlY3Qud2lkdGggPSB3aWR0aDsKICAgIGZsb2F0UmVjdC5oZWlnaHQgPSBoZWlnaHQ7CgogICAgcmV0dXJuIGZsb2F0UmVjdDsKfQoKaW50IG1haW4oKQp7CglzZkZsb2F0UmVjdCBmbG9hdFJlY3Q7CgkKCS8vIHRocm93cyBlcnJvcjogcmVxdWVzdCBmb3IgbWVtYmVyIHRvcCBpbiBzb21ldGhpbmcgbm90IGEgc3RydWN0dXJlIG9yIHVuaW9uICAgICAgCglmbG9hdFJlY3QudG9wID0gc2ZGbG9hdFJlY3Rfc2V0KDEsMSwxLDEpLnRvcDsKfQo=