fork download
  1. #include <iostream>
  2. #include <utility>
  3. using namespace std;
  4.  
  5.  
  6. struct wave{
  7. int k;
  8. int L;
  9. };
  10.  
  11. wave foo(){
  12. return {5,6};
  13. }
  14.  
  15. std::pair<int,int> foo2(){
  16. return std::make_pair(4,5);
  17. }
  18. int main() {
  19. wave w = foo();
  20. std::pair<int,int> a = foo2();
  21. cout << w.k << " " << w.L << endl;
  22. cout << a.first << " " << a.second << endl;
  23.  
  24. return 0;
  25. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
5 6
4 5