fork(1) download
  1. #include <iostream>
  2. #include <array>
  3.  
  4. std::array<int, 2> array(int x, int y) {
  5. std::array<int, 2> result = {x, y};
  6. return result;
  7. }
  8.  
  9. int main()
  10. {
  11. std::array<int, 2> order = {1,2};
  12. std::array<int, 2> nums = array(1, 2);
  13. if(nums == order)
  14. std::cout << "The arrays are equal\n";
  15. }
Success #stdin #stdout 0s 2928KB
stdin
Standard input is empty
stdout
The arrays are equal