fork download
  1. #include <iostream>
  2.  
  3. struct functionReturn
  4. {
  5. int a;
  6. int b;
  7. int c;
  8. int d;
  9. };
  10.  
  11. struct functionReturn funct()
  12. {
  13. return {1,2,3,4};
  14. }
  15.  
  16.  
  17. int main() {
  18. // your code goes here
  19.  
  20. struct functionReturn ret = funct();
  21.  
  22. std::cout << ret.a << ' ' << ret.b << ' ' << ret.c << ' ' << ret.d;
  23.  
  24.  
  25. return 0;
  26. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
1 2 3 4