It is necessary with the help of the constructor with the parameter to copy the vector. Throws a segmentation fault . Help me to understand.
class matrix{ private: int size; vector<vector<double> > mat; public: ..... matrix(vector<vector <double> > matr, int s){ size = s; mat.resize(size); for(int n=0;n<size;n++){ mat[n].resize(size); } for(int i=0;i<size;i++){ for(int j=0;j<size;j++){ mat[i].push_back(matr[i][j]); } } } .....