I have a Matrix class that has a copy constructor and an add method that adds the matrix to another and returns a new matrix, but I can not use the copy constructor with this method.

```
#include <iostream>
#include "matrix.h"
#include "methods.h"
using namespace std;
int main()
{
unsigned int n;
cin >> n;
Matrix a(n,n);
cin >> a;
Matrix b(a);
Matrix c(a.add(b));
c.print();
}
```

The Matrix line b (a) works without errors and the add method works correctly but the Matrix line c (a.add (b)) gives me the error: no matching constructor for initialization of 'Matrix'. If I use a.add (b) .print () everything works correctly. because I can not pass the result of the method to the constructor ??

This is the Matrix class:

```
Matrix::Matrix() : Matrix(3, 3){}
Matrix::Matrix(unsigned int rows, unsigned int cols){
this->rows = rows;
this->cols = cols;
this->array = std::vector<std::vector<double>>(rows, std::vector<double>(cols));
fill(0);
}
Matrix::Matrix(Matrix& m) : Matrix(m.getRows(), m.getCols()){
array = m.array;
}
void Matrix::map(std::function<double(unsigned int i, unsigned int j)> f){
for(unsigned int i = 0; i < rows; i++){
for(unsigned int j = 0; j < cols; j++){
array[i][j] = f(i, j);
}
}
}
void Matrix::fill(double d){
map([&](int, int)->double{ return d;});
}
void Matrix::print(){
for (unsigned int i = 0; i < rows; ++i) {
std::cout << array[i][0];
for (unsigned int j = 1; j < cols; ++j) {
std::cout << " " << array[i][j];
}
std::cout << std::endl;
}
}
unsigned int Matrix::getRows(){
return rows;
}
unsigned int Matrix::getCols(){
return cols;
}
Matrix Matrix::add(Matrix m){
assert(rows == m.rows && cols == m.cols);
Matrix res(rows, cols);
res.map([&](unsigned int i, unsigned int j)->double{ return array[i][j]+m.array[i][j];});
return res;
}
...
```