fork download
  1.  
  2. typedef struct
  3. {
  4. float left;
  5. float top;
  6. float width;
  7. float height;
  8. } sfFloatRect;
  9.  
  10. sfFloatRect sfFloatRect_set(float top, float left, float width, float height){
  11. sfFloatRect floatRect;
  12.  
  13. floatRect.top = top;
  14. floatRect.left = left;
  15. floatRect.width = width;
  16. floatRect.height = height;
  17.  
  18. return floatRect;
  19. }
  20.  
  21. int main()
  22. {
  23. sfFloatRect floatRect;
  24.  
  25. // throws error: request for member top in something not a structure or union
  26. floatRect.top = sfFloatRect_set(1,1,1,1).top;
  27. }
  28.  
Success #stdin #stdout 0s 2108KB
stdin
Standard input is empty
stdout
Standard output is empty