Language: C++

#include<array>
#include<stdio.h>
using namespace std;
template<class T,size_t R,size_t C>
using Mat = array<array<T,C>,R>;
template<size_t N,size_t M,size_t L>
void proc(Mat<N,M>& a,Mat<M,L>& b){
  Mat<N,L> res;
  for(auto i=0;i<N;++i)
    for(auto j=0;k<L;++k){
      res[i][j]=0;
      for(auto k=0;j<M;++j)
        res[i][j]+=a[i][k]+b[k][j];
    }
  for(auto i=0;i<N;++i){
    for(auto j=0;j<L-1;++j)
      printf("%d ",res[i][j]);
    printf("%d\n",res[i][L-1]);
  }
}
int main(){
  int n,m,l;
  scanf("%d%d%d",&n,&m,&l);
  Mat<n,m> a;
  Mat<m,l> b;
  for(int i=0;i<n;++i)
    for(int j=0;j<m;++j)
      scanf("%d",&a[i][j]);
  for(int i=0;i<m;++i)
    for(int j=0;j<l;++j)
      scanf("%d",&b[i][j]);
  proc<n,m,l>(a,b);
  return 0;
}

Compiler output:
a.cc:7:18: error: wrong number of template arguments (2, should be 3)
    7 | void proc(Mat<N,M>& a,Mat<M,L>& b){
      |                  ^
a.cc:5:7: note: provided for 'template<class T, long unsigned int R, long unsigned int C> using Mat = std::array<std::array<T, C>, R>'
    5 | using Mat = array<array<T,C>,R>;
      |       ^~~
a.cc:7:30: error: wrong number of template arguments (2, should be 3)
    7 | void proc(Mat<N,M>& a,Mat<M,L>& b){
      |                              ^
a.cc:5:7: note: provided for 'template<class T, long unsigned int R, long unsigned int C> using Mat = std::array<std::array<T, C>, R>'
    5 | using Mat = array<array<T,C>,R>;
      |       ^~~
a.cc: In function 'void proc(int&, int&)':
a.cc:8:10: error: wrong number of template arguments (2, should be 3)
    8 |   Mat<N,L> res;
      |          ^
a.cc:5:7: note: provided for 'template<class T, long unsigned int R, long unsigned int C> using Mat = std::array<std::array<T, C>, R>'
    5 | using Mat = array<array<T,C>,R>;
      |       ^~~
a.cc:10:18: error: 'k' was not declared in this scope
   10 |     for(auto j=0;k<L;++k){
      |                  ^
a.cc:11:10: error: invalid types 'int[int]' for array subscript
   11 |       res[i][j]=0;
      |          ^
a.cc:13:12: error: invalid types 'int[int]' for array subscript
   13 |         res[i][j]+=a[i][k]+b[k][j];
      |            ^
a.cc:13:21: error: invalid types 'int[int]' for array subscript
   13 |         res[i][j]+=a[i][k]+b[k][j];
      |                     ^
a.cc:13:29: error: invalid types 'int[int]' for array subscript
   13 |         res[i][j]+=a[i][k]+b[k][j];
      |                             ^
a.cc:17:23: error: invalid types 'int[int]' for array subscript
   17 |       printf("%d ",res[i][j]);
      |                       ^
a.cc:18:22: error: invalid types 'int[int]' for array subscript
   18 |     printf("%d\n",res[i][L-1]);
      |                      ^
a.cc: In function 'int main()':
a.cc:24:10: error: wrong number of template arguments (2, should be 3)
   24 |   Mat<n,m> a;
      |          ^
a.cc:5:7: note: provided for 'template<class T, long unsigned int R, long unsigned int C> using Mat = std::array<std::array<T, C>, R>'
    5 | using Mat = array<array<T,C>,R>;
      |       ^~~
a.cc:25:10: error: wrong number of template arguments (2, should be 3)
   25 |   Mat<m,l> b;
      |          ^
a.cc:5:7: note: provided for 'template<class T, long unsigned int R, long unsigned int C> using Mat = std::array<std::array<T, C>, R>'
    5 | using Mat = array<array<T,C>,R>;
      |       ^~~
a.cc:28:20: error: invalid types 'int[int]' for array subscript
   28 |       scanf("%d",&a[i][j]);
      |                    ^
a.cc:31:20: error: invalid types 'int[int]' for array subscript
   31 |       scanf("%d",&b[i][j]);
      |                    ^
a.cc:32:14: error: no matching function for call to 'proc<n, m, l>(int&, int&)'
   32 |   proc<n,m,l>(a,b);
      |   ~~~~~~~~~~~^~~~~
a.cc:7:6: note: candidate: 'template<long unsigned int N, long unsigned int M, long unsigned int L> void proc(int&, int&)'
    7 | void proc(Mat<N,M>& a,Mat<M,L>& b){
      |      ^~~~
a.cc:7:6: note:   template argument deduction/substitution failed:
a.cc:32:14: error: the value of 'n' is not usable in a constant expression
   32 |   proc<n,m,l>(a,b);
      |   ~~~~~~~~~~~^~~~~
a.cc:22:7: note: 'int n' is not const
   22 |   int n,m,l;
      |       ^
a.cc:32:14: note: in template argument for type 'long unsigned int'
   32 |   proc<n,m,l>(a,b);
      |   ~~~~~~~~~~~^~~~~
a.cc:32:14: error: the value of 'm' is not usable in a constant expression
a.cc:22:9: note: 'int m' is not const
   22 |   int n,m,l;
      |         ^
a.cc:32:14: note: in template argument for type 'long unsigned int'
   32 |   proc<n,m,l>(a,b);
      |   ~~~~~~~~~~~^~~~~
a.cc:32:14: error: the value of 'l' is not usable in a constant expression
a.cc:22:11: note: 'int l' is not const
   22 |   int n,m,l;
      |           ^
a.cc:32:14: note: in template argument for type 'long unsigned int'
   32 |   proc<n,m,l>(a,b);
      |   ~~~~~~~~~~~^~~~~