fork download
  1. #include <iostream>
  2.  
  3. template<int Rows, int Columns>
  4. void FillArray( int (&arr)[Rows][Columns] )
  5. {
  6. std::cout << "Rows: " << Rows << " Columns: " << Columns << std::endl;
  7. }
  8.  
  9. int main()
  10. {
  11. int array[12][30] , array2[5][23] , array3[12][234];
  12.  
  13. FillArray( array );
  14. FillArray( array2 );
  15. FillArray( array3 );
  16. return 0;
  17. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
Rows: 12 Columns: 30
Rows: 5 Columns: 23
Rows: 12 Columns: 234