fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. template <size_t N> void call(int (&a)[N])
  6. {
  7. for ( int x : a )
  8. cout << x << endl;
  9. }
  10.  
  11. int main()
  12. {
  13. int arr[] = {1,2,3,4,5};
  14. call(arr);
  15. }
  16.  
  17.  
  18.  
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
1
2
3
4
5