fork download
  1. #include <iostream>
  2. #include <array>
  3. using namespace std;
  4.  
  5. void print(const array<int, 2>& tab)
  6. {
  7. for(int i = 0; i < tab.size(); ++i)
  8. cout << tab[i] << endl;
  9. }
  10.  
  11. int main() {
  12. array<int, 2> tab { 1, 2 };
  13. print(tab);
  14. return 0;
  15. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
1
2