mkoctfile -O3 -fPIC -pthread -Wall -Werror -ansi -ffast-math -fomit-frame-pointer -std=c++11 -c arrayofmatrices.cpp -o arrayofmatrices.o In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/lo-utils.h:34:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:41, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h: In function 'bool operator>(const std::complex<_Tp>&, const std::complex<_Tp>&)': C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:60:39: error: 'M_PI' was not declared in this scope if (ay == static_cast (-M_PI)) \ ^ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:231:1: note: in expansion of macro 'DEF_COMPLEXR_COMP' DEF_COMPLEXR_COMP (>, >) ^~~~~~~~~~~~~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h: In function 'bool operator>(const std::complex<_Tp>&, T)': C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:82:39: error: 'M_PI' was not declared in this scope if (ay == static_cast (-M_PI)) \ ^ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:231:1: note: in expansion of macro 'DEF_COMPLEXR_COMP' DEF_COMPLEXR_COMP (>, >) ^~~~~~~~~~~~~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h: In function 'bool operator>(T, const std::complex<_Tp>&)': C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:97:39: error: 'M_PI' was not declared in this scope if (by == static_cast (-M_PI)) \ ^ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:231:1: note: in expansion of macro 'DEF_COMPLEXR_COMP' DEF_COMPLEXR_COMP (>, >) ^~~~~~~~~~~~~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h: In function 'bool operator<(const std::complex<_Tp>&, const std::complex<_Tp>&)': C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:60:39: error: 'M_PI' was not declared in this scope if (ay == static_cast (-M_PI)) \ ^ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:232:1: note: in expansion of macro 'DEF_COMPLEXR_COMP' DEF_COMPLEXR_COMP (<, <) ^~~~~~~~~~~~~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h: In function 'bool operator<(const std::complex<_Tp>&, T)': C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:82:39: error: 'M_PI' was not declared in this scope if (ay == static_cast (-M_PI)) \ ^ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:232:1: note: in expansion of macro 'DEF_COMPLEXR_COMP' DEF_COMPLEXR_COMP (<, <) ^~~~~~~~~~~~~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h: In function 'bool operator<(T, const std::complex<_Tp>&)': C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:97:39: error: 'M_PI' was not declared in this scope if (by == static_cast (-M_PI)) \ ^ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:232:1: note: in expansion of macro 'DEF_COMPLEXR_COMP' DEF_COMPLEXR_COMP (<, <) ^~~~~~~~~~~~~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h: In function 'bool operator<=(const std::complex<_Tp>&, const std::complex<_Tp>&)': C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:60:39: error: 'M_PI' was not declared in this scope if (ay == static_cast (-M_PI)) \ ^ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:233:1: note: in expansion of macro 'DEF_COMPLEXR_COMP' DEF_COMPLEXR_COMP (<=, <) ^~~~~~~~~~~~~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h: In function 'bool operator<=(const std::complex<_Tp>&, T)': C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:82:39: error: 'M_PI' was not declared in this scope if (ay == static_cast (-M_PI)) \ ^ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:233:1: note: in expansion of macro 'DEF_COMPLEXR_COMP' DEF_COMPLEXR_COMP (<=, <) ^~~~~~~~~~~~~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h: In function 'bool operator<=(T, const std::complex<_Tp>&)': C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:97:39: error: 'M_PI' was not declared in this scope if (by == static_cast (-M_PI)) \ ^ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:233:1: note: in expansion of macro 'DEF_COMPLEXR_COMP' DEF_COMPLEXR_COMP (<=, <) ^~~~~~~~~~~~~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h: In function 'bool operator>=(const std::complex<_Tp>&, const std::complex<_Tp>&)': C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:60:39: error: 'M_PI' was not declared in this scope if (ay == static_cast (-M_PI)) \ ^ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:234:1: note: in expansion of macro 'DEF_COMPLEXR_COMP' DEF_COMPLEXR_COMP (>=, >) ^~~~~~~~~~~~~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h: In function 'bool operator>=(const std::complex<_Tp>&, T)': C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:82:39: error: 'M_PI' was not declared in this scope if (ay == static_cast (-M_PI)) \ ^ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:234:1: note: in expansion of macro 'DEF_COMPLEXR_COMP' DEF_COMPLEXR_COMP (>=, >) ^~~~~~~~~~~~~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h: In function 'bool operator>=(T, const std::complex<_Tp>&)': C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:97:39: error: 'M_PI' was not declared in this scope if (by == static_cast (-M_PI)) \ ^ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/oct-cmplx.h:234:1: note: in expansion of macro 'DEF_COMPLEXR_COMP' DEF_COMPLEXR_COMP (>=, >) ^~~~~~~~~~~~~~~~~ In file included from arrayofmatrices.h:4:0, from arrayofmatrices.cpp:3: array.h: At global scope: array.h:29:29: error: redefinition of 'class Array' template class Array { ^~~~~ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:126:1: note: previous definition of 'class Array' Array ^~~~~ In file included from arrayofmatrices.h:4:0, from arrayofmatrices.cpp:3: array.h:81:23: error: prototype for 'Array::Array(int)' does not match any in class 'Array' template Array::Array (int length) { ^~~~~~~~~~~ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:296:3: error: candidates are: Array::Array(const Array&) Array (const Array& a) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:289:3: error: template template Array::Array(const Array&) Array (const Array& a) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:285:3: error: template template class Container> template template class Container> Array::Array(const Container&, const dim_vector&) Array (const Container& a, const dim_vector& dv); ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:281:3: error: Array::Array(const Array&, const dim_vector&) Array (const Array& a, const dim_vector& dv); ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:271:12: error: Array::Array(const dim_vector&, const T&) explicit Array (const dim_vector& dv, const T& val) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:262:12: error: Array::Array(const dim_vector&) explicit Array (const dim_vector& dv) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:254:3: error: Array::Array() Array (void) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:246:3: error: Array::Array(T*, octave_idx_type, octave_idx_type*, void*) Array (T *sdata, octave_idx_type slen, octave_idx_type *adims, void *arep) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:231:3: error: Array::Array(const Array&, const dim_vector&, octave_idx_type, octave_idx_type) Array (const Array& a, const dim_vector& dv, ^~~~~ In file included from arrayofmatrices.h:4:0, from arrayofmatrices.cpp:3: array.h:88:23: error: prototype for 'Array::Array(Type*, int)' does not match any in class 'Array' template Array::Array (Type* data, int length) { ^~~~~~~~~~~ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:296:3: error: candidates are: Array::Array(const Array&) Array (const Array& a) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:289:3: error: template template Array::Array(const Array&) Array (const Array& a) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:285:3: error: template template class Container> template template class Container> Array::Array(const Container&, const dim_vector&) Array (const Container& a, const dim_vector& dv); ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:281:3: error: Array::Array(const Array&, const dim_vector&) Array (const Array& a, const dim_vector& dv); ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:271:12: error: Array::Array(const dim_vector&, const T&) explicit Array (const dim_vector& dv, const T& val) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:262:12: error: Array::Array(const dim_vector&) explicit Array (const dim_vector& dv) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:254:3: error: Array::Array() Array (void) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:246:3: error: Array::Array(T*, octave_idx_type, octave_idx_type*, void*) Array (T *sdata, octave_idx_type slen, octave_idx_type *adims, void *arep) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:231:3: error: Array::Array(const Array&, const dim_vector&, octave_idx_type, octave_idx_type) Array (const Array& a, const dim_vector& dv, ^~~~~ In file included from arrayofmatrices.h:4:0, from arrayofmatrices.cpp:3: array.h:94:23: error: redefinition of 'Array::Array(const Array&)' template Array::Array (const Array& source) { ^~~~~~~~~~~ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:296:3: note: 'Array::Array(const Array&)' previously declared here Array (const Array& a) ^~~~~ In file included from arrayofmatrices.h:4:0, from arrayofmatrices.cpp:3: array.h:100:23: error: redefinition of 'Array::~Array()' template Array::~Array () { ^~~~~~~~~~~ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:305:11: note: 'virtual Array::~Array()' previously declared here virtual ~Array (void) ^ In file included from arrayofmatrices.h:4:0, from arrayofmatrices.cpp:3: array.h:105:68: error: no 'void Array::setvalue(const Type&)' member function declared in class 'Array' template void Array::setvalue (const Type& value) { ^ array.h:110:67: error: no 'void Array::inject(const Type*)' member function declared in class 'Array' template void Array::inject (const Type* source) { ^ array.h:118:74: error: no 'void Array::inject(const Array&)' member function declared in class 'Array' template void Array::inject (const Array& source) { ^ array.h:125:36: error: prototype for 'Array& Array::operator=(const Type*)' does not match any in class 'Array' template Array& Array::operator= ^~~~~~~~~~~ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:311:13: error: candidate is: Array& Array::operator=(const Array&) Array& operator = (const Array& a) ^~~~~~~~ In file included from arrayofmatrices.h:4:0, from arrayofmatrices.cpp:3: array.h:131:36: error: redefinition of 'Array& Array::operator=(const Array&)' template Array& Array::operator= ^~~~~~~~~~~ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:311:13: note: 'Array& Array::operator=(const Array&)' previously declared here Array& operator = (const Array& a) ^~~~~~~~ In file included from arrayofmatrices.h:4:0, from arrayofmatrices.cpp:3: array.h:137:59: error: no 'Type& Array::operator[](int)' member function declared in class 'Array' template Type& Array::operator[] (int i) { ^ array.h:141:67: error: no 'const Type& Array::operator[](int) const' member function declared in class 'Array' template const Type& Array::operator[] (int i) const { ^~~~~ In file included from arrayofmatrices.h:5:0, from arrayofmatrices.cpp:3: matlabmatrix.h:22:7: error: redefinition of 'class Matrix' class Matrix : public Array { ^~~~~~ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:36:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:38:1: note: previous definition of 'class Matrix' Matrix : public NDArray ^~~~~~ In file included from arrayofmatrices.cpp:3:0: arrayofmatrices.h: In constructor 'ArrayOfMatrices::ArrayOfMatrices(int)': arrayofmatrices.h:15:28: error: no matching function for call to 'Array::Array(int&)' : Array(length) { }; ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:296:3: note: candidate: Array::Array(const Array&) [with T = Matrix*] Array (const Array& a) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:296:3: note: no known conversion for argument 1 from 'int' to 'const Array&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:289:3: note: candidate: template Array::Array(const Array&) Array (const Array& a) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:289:3: note: template argument deduction/substitution failed: In file included from arrayofmatrices.cpp:3:0: arrayofmatrices.h:15:28: note: mismatched types 'const Array' and 'int' : Array(length) { }; ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:285:3: note: candidate: template class Container> Array::Array(const Container&, const dim_vector&) Array (const Container& a, const dim_vector& dv); ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:285:3: note: template argument deduction/substitution failed: In file included from arrayofmatrices.cpp:3:0: arrayofmatrices.h:15:28: note: can't deduce a template for 'const Container' from non-template type 'int' : Array(length) { }; ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:281:3: note: candidate: Array::Array(const Array&, const dim_vector&) [with T = Matrix*] Array (const Array& a, const dim_vector& dv); ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:281:3: note: candidate expects 2 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:271:12: note: candidate: Array::Array(const dim_vector&, const T&) [with T = Matrix*] explicit Array (const dim_vector& dv, const T& val) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:271:12: note: candidate expects 2 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:262:12: note: candidate: Array::Array(const dim_vector&) [with T = Matrix*] explicit Array (const dim_vector& dv) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:262:12: note: no known conversion for argument 1 from 'int' to 'const dim_vector&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:254:3: note: candidate: Array::Array() [with T = Matrix*] Array (void) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:254:3: note: candidate expects 0 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:246:3: note: candidate: Array::Array(T*, octave_idx_type, octave_idx_type*, void*) [with T = Matrix*; octave_idx_type = long long int] Array (T *sdata, octave_idx_type slen, octave_idx_type *adims, void *arep) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:246:3: note: candidate expects 4 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:231:3: note: candidate: Array::Array(const Array&, const dim_vector&, octave_idx_type, octave_idx_type) [with T = Matrix*; octave_idx_type = long long int] Array (const Array& a, const dim_vector& dv, ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:231:3: note: candidate expects 4 arguments, 1 provided arrayofmatrices.cpp: In constructor 'ArrayOfMatrices::ArrayOfMatrices(const mxArray*)': arrayofmatrices.cpp:8:45: error: no matching function for call to 'Array::Array(int)' : Array(getnummatlabmatrices(ptr)) { ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:296:3: note: candidate: Array::Array(const Array&) [with T = Matrix*] Array (const Array& a) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:296:3: note: no known conversion for argument 1 from 'int' to 'const Array&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:289:3: note: candidate: template Array::Array(const Array&) Array (const Array& a) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:289:3: note: template argument deduction/substitution failed: arrayofmatrices.cpp:8:45: note: mismatched types 'const Array' and 'int' : Array(getnummatlabmatrices(ptr)) { ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:285:3: note: candidate: template class Container> Array::Array(const Container&, const dim_vector&) Array (const Container& a, const dim_vector& dv); ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:285:3: note: template argument deduction/substitution failed: arrayofmatrices.cpp:8:45: note: can't deduce a template for 'const Container' from non-template type 'int' : Array(getnummatlabmatrices(ptr)) { ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:281:3: note: candidate: Array::Array(const Array&, const dim_vector&) [with T = Matrix*] Array (const Array& a, const dim_vector& dv); ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:281:3: note: candidate expects 2 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:271:12: note: candidate: Array::Array(const dim_vector&, const T&) [with T = Matrix*] explicit Array (const dim_vector& dv, const T& val) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:271:12: note: candidate expects 2 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:262:12: note: candidate: Array::Array(const dim_vector&) [with T = Matrix*] explicit Array (const dim_vector& dv) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:262:12: note: no known conversion for argument 1 from 'int' to 'const dim_vector&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:254:3: note: candidate: Array::Array() [with T = Matrix*] Array (void) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:254:3: note: candidate expects 0 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:246:3: note: candidate: Array::Array(T*, octave_idx_type, octave_idx_type*, void*) [with T = Matrix*; octave_idx_type = long long int] Array (T *sdata, octave_idx_type slen, octave_idx_type *adims, void *arep) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:246:3: note: candidate expects 4 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:231:3: note: candidate: Array::Array(const Array&, const dim_vector&, octave_idx_type, octave_idx_type) [with T = Matrix*; octave_idx_type = long long int] Array (const Array& a, const dim_vector& dv, ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:231:3: note: candidate expects 4 arguments, 1 provided arrayofmatrices.cpp:9:3: error: 'setvalue' was not declared in this scope setvalue(0); ^~~~~~~~ arrayofmatrices.cpp:9:3: note: suggested alternative: 'setvbuf' setvalue(0); ^~~~~~~~ setvbuf arrayofmatrices.cpp:15:25: error: 'n' was not declared in this scope for (int i = 0; i < n; i++) ^ arrayofmatrices.cpp:16:7: error: 'elems' was not declared in this scope elems[i] = new Matrix(mxGetCell(ptr,i)); ^~~~~ arrayofmatrices.cpp:16:7: note: suggested alternative: 'elem' elems[i] = new Matrix(mxGetCell(ptr,i)); ^~~~~ elem arrayofmatrices.cpp:16:45: error: no matching function for call to 'Matrix::Matrix(mxArray*)' elems[i] = new Matrix(mxGetCell(ptr,i)); ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:36:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:94:12: note: candidate: Matrix::Matrix(const charMatrix&) explicit Matrix (const charMatrix& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:94:12: note: conversion of argument 1 would be ill-formed: arrayofmatrices.cpp:16:45: error: conversion from 'mxArray* {aka void*}' to 'const charMatrix' is ambiguous elems[i] = new Matrix(mxGetCell(ptr,i)); ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:35:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/chMatrix.h:64:3: note: candidate: charMatrix::charMatrix(const char*) charMatrix (const char *s) : charNDArray (s) { } ^~~~~~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/chMatrix.h:64:3: note: conversion of argument 1 would be ill-formed: arrayofmatrices.cpp:16:38: error: invalid conversion from 'mxArray* {aka void*}' to 'const char*' [-fpermissive] elems[i] = new Matrix(mxGetCell(ptr,i)); ~~~~~~~~~^~~~~~~ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:35:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/chMatrix.h:62:3: note: candidate: charMatrix::charMatrix(char) charMatrix (char c) : charNDArray (c) { } ^~~~~~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/chMatrix.h:62:3: note: conversion of argument 1 would be ill-formed: arrayofmatrices.cpp:16:38: error: invalid conversion from 'mxArray* {aka void*}' to 'char' [-fpermissive] elems[i] = new Matrix(mxGetCell(ptr,i)); ~~~~~~~~~^~~~~~~ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:36:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:90:12: note: candidate: Matrix::Matrix(const PermMatrix&) explicit Matrix (const PermMatrix& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:90:12: note: conversion of argument 1 would be ill-formed: arrayofmatrices.cpp:16:38: error: invalid user-defined conversion from 'mxArray* {aka void*}' to 'const PermMatrix&' [-fpermissive] elems[i] = new Matrix(mxGetCell(ptr,i)); ~~~~~~~~~^~~~~~~ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:63:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/PermMatrix.h:40:3: note: candidate is: PermMatrix::PermMatrix(octave_idx_type) PermMatrix (octave_idx_type n); ^~~~~~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/PermMatrix.h:40:3: note: conversion of argument 1 would be ill-formed: arrayofmatrices.cpp:16:38: error: invalid conversion from 'mxArray* {aka void*}' to 'octave_idx_type {aka long long int}' [-fpermissive] elems[i] = new Matrix(mxGetCell(ptr,i)); ~~~~~~~~~^~~~~~~ arrayofmatrices.cpp:16:38: error: invalid conversion from 'mxArray* {aka void*}' to 'octave_idx_type {aka long long int}' [-fpermissive] In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:63:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/PermMatrix.h:40:3: note: initializing argument 1 of 'PermMatrix::PermMatrix(octave_idx_type)' PermMatrix (octave_idx_type n); ^~~~~~~~~~ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:36:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:92:12: note: candidate: Matrix::Matrix(const boolMatrix&) explicit Matrix (const boolMatrix& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:92:12: note: no known conversion for argument 1 from 'mxArray* {aka void*}' to 'const boolMatrix&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:88:12: note: candidate: Matrix::Matrix(const DiagArray2&) explicit Matrix (const DiagArray2& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:88:12: note: no known conversion for argument 1 from 'mxArray* {aka void*}' to 'const DiagArray2&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:86:12: note: candidate: Matrix::Matrix(const MDiagArray2&) explicit Matrix (const MDiagArray2& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:86:12: note: no known conversion for argument 1 from 'mxArray* {aka void*}' to 'const MDiagArray2&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:84:12: note: candidate: Matrix::Matrix(const DiagMatrix&) explicit Matrix (const DiagMatrix& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:84:12: note: no known conversion for argument 1 from 'mxArray* {aka void*}' to 'const DiagMatrix&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:82:12: note: candidate: Matrix::Matrix(const ColumnVector&) explicit Matrix (const ColumnVector& cv); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:82:12: note: no known conversion for argument 1 from 'mxArray* {aka void*}' to 'const ColumnVector&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:80:12: note: candidate: Matrix::Matrix(const RowVector&) explicit Matrix (const RowVector& rv); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:80:12: note: no known conversion for argument 1 from 'mxArray* {aka void*}' to 'const RowVector&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:78:3: note: candidate: template Matrix::Matrix(const Array&) Matrix (const Array& a) : NDArray (a.as_matrix ()) { } ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:78:3: note: template argument deduction/substitution failed: arrayofmatrices.cpp:16:45: note: mismatched types 'const Array' and 'mxArray* {aka void*}' elems[i] = new Matrix(mxGetCell(ptr,i)); ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:36:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:75:3: note: candidate: template Matrix::Matrix(const MArray&) Matrix (const MArray& a) : NDArray (a.as_matrix ()) { } ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:75:3: note: template argument deduction/substitution failed: arrayofmatrices.cpp:16:45: note: mismatched types 'const MArray' and 'mxArray* {aka void*}' elems[i] = new Matrix(mxGetCell(ptr,i)); ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:36:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:72:3: note: candidate: Matrix::Matrix(const Matrix&) Matrix (const Matrix& a) : NDArray (a) { } ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:72:3: note: no known conversion for argument 1 from 'mxArray* {aka void*}' to 'const Matrix&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:69:3: note: candidate: Matrix::Matrix(const dim_vector&, double) Matrix (const dim_vector& dv, double val) ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:69:3: note: candidate expects 2 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:67:3: note: candidate: Matrix::Matrix(const dim_vector&) Matrix (const dim_vector& dv) : NDArray (dv.redim (2)) { } ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:67:3: note: no known conversion for argument 1 from 'mxArray* {aka void*}' to 'const dim_vector&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:64:3: note: candidate: Matrix::Matrix(octave_idx_type, octave_idx_type, double) Matrix (octave_idx_type r, octave_idx_type c, double val) ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:64:3: note: candidate expects 3 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:61:3: note: candidate: Matrix::Matrix(octave_idx_type, octave_idx_type) Matrix (octave_idx_type r, octave_idx_type c) ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:61:3: note: candidate expects 2 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:59:3: note: candidate: Matrix::Matrix() Matrix (void) : NDArray () { } ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:59:3: note: candidate expects 0 arguments, 1 provided arrayofmatrices.cpp:20:5: error: 'elems' was not declared in this scope elems[0] = new Matrix(ptr); ^~~~~ arrayofmatrices.cpp:20:5: note: suggested alternative: 'elem' elems[0] = new Matrix(ptr); ^~~~~ elem arrayofmatrices.cpp:20:30: error: no matching function for call to 'Matrix::Matrix(const mxArray*&)' elems[0] = new Matrix(ptr); ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:36:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:94:12: note: candidate: Matrix::Matrix(const charMatrix&) explicit Matrix (const charMatrix& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:94:12: note: conversion of argument 1 would be ill-formed: arrayofmatrices.cpp:20:30: error: conversion from 'const mxArray* {aka const void*}' to 'const charMatrix' is ambiguous elems[0] = new Matrix(ptr); ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:35:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/chMatrix.h:64:3: note: candidate: charMatrix::charMatrix(const char*) charMatrix (const char *s) : charNDArray (s) { } ^~~~~~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/chMatrix.h:64:3: note: conversion of argument 1 would be ill-formed: arrayofmatrices.cpp:20:30: error: invalid conversion from 'const mxArray* {aka const void*}' to 'const char*' [-fpermissive] elems[0] = new Matrix(ptr); ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:35:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/chMatrix.h:62:3: note: candidate: charMatrix::charMatrix(char) charMatrix (char c) : charNDArray (c) { } ^~~~~~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/chMatrix.h:62:3: note: conversion of argument 1 would be ill-formed: arrayofmatrices.cpp:20:30: error: invalid conversion from 'const mxArray* {aka const void*}' to 'char' [-fpermissive] elems[0] = new Matrix(ptr); ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:36:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:90:12: note: candidate: Matrix::Matrix(const PermMatrix&) explicit Matrix (const PermMatrix& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:90:12: note: conversion of argument 1 would be ill-formed: arrayofmatrices.cpp:20:30: error: invalid user-defined conversion from 'const mxArray* {aka const void*}' to 'const PermMatrix&' [-fpermissive] elems[0] = new Matrix(ptr); ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:63:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/PermMatrix.h:40:3: note: candidate is: PermMatrix::PermMatrix(octave_idx_type) PermMatrix (octave_idx_type n); ^~~~~~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/PermMatrix.h:40:3: note: conversion of argument 1 would be ill-formed: arrayofmatrices.cpp:20:30: error: invalid conversion from 'const mxArray* {aka const void*}' to 'octave_idx_type {aka long long int}' [-fpermissive] elems[0] = new Matrix(ptr); ^ arrayofmatrices.cpp:20:30: error: invalid conversion from 'const mxArray* {aka const void*}' to 'octave_idx_type {aka long long int}' [-fpermissive] In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:63:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/PermMatrix.h:40:3: note: initializing argument 1 of 'PermMatrix::PermMatrix(octave_idx_type)' PermMatrix (octave_idx_type n); ^~~~~~~~~~ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:36:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:92:12: note: candidate: Matrix::Matrix(const boolMatrix&) explicit Matrix (const boolMatrix& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:92:12: note: no known conversion for argument 1 from 'const mxArray* {aka const void*}' to 'const boolMatrix&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:88:12: note: candidate: Matrix::Matrix(const DiagArray2&) explicit Matrix (const DiagArray2& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:88:12: note: no known conversion for argument 1 from 'const mxArray* {aka const void*}' to 'const DiagArray2&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:86:12: note: candidate: Matrix::Matrix(const MDiagArray2&) explicit Matrix (const MDiagArray2& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:86:12: note: no known conversion for argument 1 from 'const mxArray* {aka const void*}' to 'const MDiagArray2&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:84:12: note: candidate: Matrix::Matrix(const DiagMatrix&) explicit Matrix (const DiagMatrix& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:84:12: note: no known conversion for argument 1 from 'const mxArray* {aka const void*}' to 'const DiagMatrix&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:82:12: note: candidate: Matrix::Matrix(const ColumnVector&) explicit Matrix (const ColumnVector& cv); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:82:12: note: no known conversion for argument 1 from 'const mxArray* {aka const void*}' to 'const ColumnVector&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:80:12: note: candidate: Matrix::Matrix(const RowVector&) explicit Matrix (const RowVector& rv); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:80:12: note: no known conversion for argument 1 from 'const mxArray* {aka const void*}' to 'const RowVector&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:78:3: note: candidate: template Matrix::Matrix(const Array&) Matrix (const Array& a) : NDArray (a.as_matrix ()) { } ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:78:3: note: template argument deduction/substitution failed: arrayofmatrices.cpp:20:30: note: mismatched types 'const Array' and 'const mxArray* {aka const void*}' elems[0] = new Matrix(ptr); ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:36:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:75:3: note: candidate: template Matrix::Matrix(const MArray&) Matrix (const MArray& a) : NDArray (a.as_matrix ()) { } ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:75:3: note: template argument deduction/substitution failed: arrayofmatrices.cpp:20:30: note: mismatched types 'const MArray' and 'const mxArray* {aka const void*}' elems[0] = new Matrix(ptr); ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:36:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:72:3: note: candidate: Matrix::Matrix(const Matrix&) Matrix (const Matrix& a) : NDArray (a) { } ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:72:3: note: no known conversion for argument 1 from 'const mxArray* {aka const void*}' to 'const Matrix&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:69:3: note: candidate: Matrix::Matrix(const dim_vector&, double) Matrix (const dim_vector& dv, double val) ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:69:3: note: candidate expects 2 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:67:3: note: candidate: Matrix::Matrix(const dim_vector&) Matrix (const dim_vector& dv) : NDArray (dv.redim (2)) { } ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:67:3: note: no known conversion for argument 1 from 'const mxArray* {aka const void*}' to 'const dim_vector&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:64:3: note: candidate: Matrix::Matrix(octave_idx_type, octave_idx_type, double) Matrix (octave_idx_type r, octave_idx_type c, double val) ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:64:3: note: candidate expects 3 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:61:3: note: candidate: Matrix::Matrix(octave_idx_type, octave_idx_type) Matrix (octave_idx_type r, octave_idx_type c) ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:61:3: note: candidate expects 2 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:59:3: note: candidate: Matrix::Matrix() Matrix (void) : NDArray () { } ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:59:3: note: candidate expects 0 arguments, 1 provided arrayofmatrices.cpp: In constructor 'ArrayOfMatrices::ArrayOfMatrices(const mxArray**, int)': arrayofmatrices.cpp:24:27: error: no matching function for call to 'Array::Array(int&)' : Array(numptrs) { ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:296:3: note: candidate: Array::Array(const Array&) [with T = Matrix*] Array (const Array& a) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:296:3: note: no known conversion for argument 1 from 'int' to 'const Array&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:289:3: note: candidate: template Array::Array(const Array&) Array (const Array& a) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:289:3: note: template argument deduction/substitution failed: arrayofmatrices.cpp:24:27: note: mismatched types 'const Array' and 'int' : Array(numptrs) { ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:285:3: note: candidate: template class Container> Array::Array(const Container&, const dim_vector&) Array (const Container& a, const dim_vector& dv); ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:285:3: note: template argument deduction/substitution failed: arrayofmatrices.cpp:24:27: note: can't deduce a template for 'const Container' from non-template type 'int' : Array(numptrs) { ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:281:3: note: candidate: Array::Array(const Array&, const dim_vector&) [with T = Matrix*] Array (const Array& a, const dim_vector& dv); ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:281:3: note: candidate expects 2 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:271:12: note: candidate: Array::Array(const dim_vector&, const T&) [with T = Matrix*] explicit Array (const dim_vector& dv, const T& val) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:271:12: note: candidate expects 2 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:262:12: note: candidate: Array::Array(const dim_vector&) [with T = Matrix*] explicit Array (const dim_vector& dv) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:262:12: note: no known conversion for argument 1 from 'int' to 'const dim_vector&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:254:3: note: candidate: Array::Array() [with T = Matrix*] Array (void) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:254:3: note: candidate expects 0 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:246:3: note: candidate: Array::Array(T*, octave_idx_type, octave_idx_type*, void*) [with T = Matrix*; octave_idx_type = long long int] Array (T *sdata, octave_idx_type slen, octave_idx_type *adims, void *arep) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:246:3: note: candidate expects 4 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:231:3: note: candidate: Array::Array(const Array&, const dim_vector&, octave_idx_type, octave_idx_type) [with T = Matrix*; octave_idx_type = long long int] Array (const Array& a, const dim_vector& dv, ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:231:3: note: candidate expects 4 arguments, 1 provided arrayofmatrices.cpp:25:3: error: 'setvalue' was not declared in this scope setvalue(0); ^~~~~~~~ arrayofmatrices.cpp:25:3: note: suggested alternative: 'setvbuf' setvalue(0); ^~~~~~~~ setvbuf arrayofmatrices.cpp:28:5: error: 'elems' was not declared in this scope elems[i] = new Matrix(ptrs[i]); ^~~~~ arrayofmatrices.cpp:28:5: note: suggested alternative: 'elem' elems[i] = new Matrix(ptrs[i]); ^~~~~ elem arrayofmatrices.cpp:28:34: error: no matching function for call to 'Matrix::Matrix(const mxArray*&)' elems[i] = new Matrix(ptrs[i]); ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:36:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:94:12: note: candidate: Matrix::Matrix(const charMatrix&) explicit Matrix (const charMatrix& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:94:12: note: conversion of argument 1 would be ill-formed: arrayofmatrices.cpp:28:34: error: conversion from 'const mxArray* {aka const void*}' to 'const charMatrix' is ambiguous elems[i] = new Matrix(ptrs[i]); ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:35:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/chMatrix.h:64:3: note: candidate: charMatrix::charMatrix(const char*) charMatrix (const char *s) : charNDArray (s) { } ^~~~~~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/chMatrix.h:64:3: note: conversion of argument 1 would be ill-formed: arrayofmatrices.cpp:28:33: error: invalid conversion from 'const mxArray* {aka const void*}' to 'const char*' [-fpermissive] elems[i] = new Matrix(ptrs[i]); ~~~~~~^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:35:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/chMatrix.h:62:3: note: candidate: charMatrix::charMatrix(char) charMatrix (char c) : charNDArray (c) { } ^~~~~~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/chMatrix.h:62:3: note: conversion of argument 1 would be ill-formed: arrayofmatrices.cpp:28:33: error: invalid conversion from 'const mxArray* {aka const void*}' to 'char' [-fpermissive] elems[i] = new Matrix(ptrs[i]); ~~~~~~^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:36:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:90:12: note: candidate: Matrix::Matrix(const PermMatrix&) explicit Matrix (const PermMatrix& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:90:12: note: conversion of argument 1 would be ill-formed: arrayofmatrices.cpp:28:33: error: invalid user-defined conversion from 'const mxArray* {aka const void*}' to 'const PermMatrix&' [-fpermissive] elems[i] = new Matrix(ptrs[i]); ~~~~~~^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:63:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/PermMatrix.h:40:3: note: candidate is: PermMatrix::PermMatrix(octave_idx_type) PermMatrix (octave_idx_type n); ^~~~~~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/PermMatrix.h:40:3: note: conversion of argument 1 would be ill-formed: arrayofmatrices.cpp:28:33: error: invalid conversion from 'const mxArray* {aka const void*}' to 'octave_idx_type {aka long long int}' [-fpermissive] elems[i] = new Matrix(ptrs[i]); ~~~~~~^ arrayofmatrices.cpp:28:33: error: invalid conversion from 'const mxArray* {aka const void*}' to 'octave_idx_type {aka long long int}' [-fpermissive] In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:63:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/PermMatrix.h:40:3: note: initializing argument 1 of 'PermMatrix::PermMatrix(octave_idx_type)' PermMatrix (octave_idx_type n); ^~~~~~~~~~ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:36:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:92:12: note: candidate: Matrix::Matrix(const boolMatrix&) explicit Matrix (const boolMatrix& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:92:12: note: no known conversion for argument 1 from 'const mxArray* {aka const void*}' to 'const boolMatrix&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:88:12: note: candidate: Matrix::Matrix(const DiagArray2&) explicit Matrix (const DiagArray2& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:88:12: note: no known conversion for argument 1 from 'const mxArray* {aka const void*}' to 'const DiagArray2&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:86:12: note: candidate: Matrix::Matrix(const MDiagArray2&) explicit Matrix (const MDiagArray2& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:86:12: note: no known conversion for argument 1 from 'const mxArray* {aka const void*}' to 'const MDiagArray2&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:84:12: note: candidate: Matrix::Matrix(const DiagMatrix&) explicit Matrix (const DiagMatrix& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:84:12: note: no known conversion for argument 1 from 'const mxArray* {aka const void*}' to 'const DiagMatrix&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:82:12: note: candidate: Matrix::Matrix(const ColumnVector&) explicit Matrix (const ColumnVector& cv); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:82:12: note: no known conversion for argument 1 from 'const mxArray* {aka const void*}' to 'const ColumnVector&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:80:12: note: candidate: Matrix::Matrix(const RowVector&) explicit Matrix (const RowVector& rv); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:80:12: note: no known conversion for argument 1 from 'const mxArray* {aka const void*}' to 'const RowVector&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:78:3: note: candidate: template Matrix::Matrix(const Array&) Matrix (const Array& a) : NDArray (a.as_matrix ()) { } ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:78:3: note: template argument deduction/substitution failed: arrayofmatrices.cpp:28:34: note: mismatched types 'const Array' and 'const mxArray* {aka const void*}' elems[i] = new Matrix(ptrs[i]); ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:36:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:75:3: note: candidate: template Matrix::Matrix(const MArray&) Matrix (const MArray& a) : NDArray (a.as_matrix ()) { } ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:75:3: note: template argument deduction/substitution failed: arrayofmatrices.cpp:28:34: note: mismatched types 'const MArray' and 'const mxArray* {aka const void*}' elems[i] = new Matrix(ptrs[i]); ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:36:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:72:3: note: candidate: Matrix::Matrix(const Matrix&) Matrix (const Matrix& a) : NDArray (a) { } ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:72:3: note: no known conversion for argument 1 from 'const mxArray* {aka const void*}' to 'const Matrix&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:69:3: note: candidate: Matrix::Matrix(const dim_vector&, double) Matrix (const dim_vector& dv, double val) ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:69:3: note: candidate expects 2 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:67:3: note: candidate: Matrix::Matrix(const dim_vector&) Matrix (const dim_vector& dv) : NDArray (dv.redim (2)) { } ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:67:3: note: no known conversion for argument 1 from 'const mxArray* {aka const void*}' to 'const dim_vector&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:64:3: note: candidate: Matrix::Matrix(octave_idx_type, octave_idx_type, double) Matrix (octave_idx_type r, octave_idx_type c, double val) ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:64:3: note: candidate expects 3 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:61:3: note: candidate: Matrix::Matrix(octave_idx_type, octave_idx_type) Matrix (octave_idx_type r, octave_idx_type c) ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:61:3: note: candidate expects 2 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:59:3: note: candidate: Matrix::Matrix() Matrix (void) : NDArray () { } ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:59:3: note: candidate expects 0 arguments, 1 provided arrayofmatrices.cpp: In constructor 'ArrayOfMatrices::ArrayOfMatrices(mxArray**, const ArrayOfMatrices&)': arrayofmatrices.cpp:33:34: error: 'octave_idx_type Array::length() const [with T = Matrix*; octave_idx_type = long long int]' is deprecated: [4.4]: use 'numel' instead [-Werror=deprecated-declarations] : Array(source.length()) { ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:357:19: note: declared here octave_idx_type length (void) const { return numel (); } ^~~~~~ arrayofmatrices.cpp:33:35: error: no matching function for call to 'Array::Array(octave_idx_type)' : Array(source.length()) { ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:296:3: note: candidate: Array::Array(const Array&) [with T = Matrix*] Array (const Array& a) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:296:3: note: no known conversion for argument 1 from 'octave_idx_type {aka long long int}' to 'const Array&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:289:3: note: candidate: template Array::Array(const Array&) Array (const Array& a) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:289:3: note: template argument deduction/substitution failed: arrayofmatrices.cpp:33:35: note: mismatched types 'const Array' and 'octave_idx_type {aka long long int}' : Array(source.length()) { ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:285:3: note: candidate: template class Container> Array::Array(const Container&, const dim_vector&) Array (const Container& a, const dim_vector& dv); ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:285:3: note: template argument deduction/substitution failed: arrayofmatrices.cpp:33:35: note: can't deduce a template for 'const Container' from non-template type 'octave_idx_type {aka long long int}' : Array(source.length()) { ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:281:3: note: candidate: Array::Array(const Array&, const dim_vector&) [with T = Matrix*] Array (const Array& a, const dim_vector& dv); ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:281:3: note: candidate expects 2 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:271:12: note: candidate: Array::Array(const dim_vector&, const T&) [with T = Matrix*] explicit Array (const dim_vector& dv, const T& val) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:271:12: note: candidate expects 2 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:262:12: note: candidate: Array::Array(const dim_vector&) [with T = Matrix*] explicit Array (const dim_vector& dv) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:262:12: note: no known conversion for argument 1 from 'octave_idx_type {aka long long int}' to 'const dim_vector&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:254:3: note: candidate: Array::Array() [with T = Matrix*] Array (void) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:254:3: note: candidate expects 0 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:246:3: note: candidate: Array::Array(T*, octave_idx_type, octave_idx_type*, void*) [with T = Matrix*; octave_idx_type = long long int] Array (T *sdata, octave_idx_type slen, octave_idx_type *adims, void *arep) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:246:3: note: candidate expects 4 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:231:3: note: candidate: Array::Array(const Array&, const dim_vector&, octave_idx_type, octave_idx_type) [with T = Matrix*; octave_idx_type = long long int] Array (const Array& a, const dim_vector& dv, ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:231:3: note: candidate expects 4 arguments, 1 provided arrayofmatrices.cpp:34:3: error: 'setvalue' was not declared in this scope setvalue(0); ^~~~~~~~ arrayofmatrices.cpp:34:3: note: suggested alternative: 'setvbuf' setvalue(0); ^~~~~~~~ setvbuf arrayofmatrices.cpp:38:23: error: 'n' was not declared in this scope for (int i = 0; i < n; i++) { ^ arrayofmatrices.cpp:39:23: error: no match for 'operator[]' (operand types are 'const ArrayOfMatrices' and 'int') int h = source[i]->height(); ^ arrayofmatrices.cpp:40:23: error: no match for 'operator[]' (operand types are 'const ArrayOfMatrices' and 'int') int w = source[i]->width(); ^ arrayofmatrices.cpp:41:5: error: 'elems' was not declared in this scope elems[i] = new Matrix(ptrs[i],h,w); ^~~~~ arrayofmatrices.cpp:41:5: note: suggested alternative: 'elem' elems[i] = new Matrix(ptrs[i],h,w); ^~~~~ elem arrayofmatrices.cpp:41:39: error: no matching function for call to 'Matrix::Matrix(mxArray*&, int&, int&)' elems[i] = new Matrix(ptrs[i],h,w); ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:36:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:94:12: note: candidate: Matrix::Matrix(const charMatrix&) explicit Matrix (const charMatrix& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:94:12: note: candidate expects 1 argument, 3 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:92:12: note: candidate: Matrix::Matrix(const boolMatrix&) explicit Matrix (const boolMatrix& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:92:12: note: candidate expects 1 argument, 3 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:90:12: note: candidate: Matrix::Matrix(const PermMatrix&) explicit Matrix (const PermMatrix& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:90:12: note: candidate expects 1 argument, 3 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:88:12: note: candidate: Matrix::Matrix(const DiagArray2&) explicit Matrix (const DiagArray2& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:88:12: note: candidate expects 1 argument, 3 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:86:12: note: candidate: Matrix::Matrix(const MDiagArray2&) explicit Matrix (const MDiagArray2& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:86:12: note: candidate expects 1 argument, 3 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:84:12: note: candidate: Matrix::Matrix(const DiagMatrix&) explicit Matrix (const DiagMatrix& a); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:84:12: note: candidate expects 1 argument, 3 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:82:12: note: candidate: Matrix::Matrix(const ColumnVector&) explicit Matrix (const ColumnVector& cv); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:82:12: note: candidate expects 1 argument, 3 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:80:12: note: candidate: Matrix::Matrix(const RowVector&) explicit Matrix (const RowVector& rv); ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:80:12: note: candidate expects 1 argument, 3 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:78:3: note: candidate: template Matrix::Matrix(const Array&) Matrix (const Array& a) : NDArray (a.as_matrix ()) { } ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:78:3: note: template argument deduction/substitution failed: arrayofmatrices.cpp:41:39: note: mismatched types 'const Array' and 'mxArray* {aka void*}' elems[i] = new Matrix(ptrs[i],h,w); ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:36:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:75:3: note: candidate: template Matrix::Matrix(const MArray&) Matrix (const MArray& a) : NDArray (a.as_matrix ()) { } ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:75:3: note: template argument deduction/substitution failed: arrayofmatrices.cpp:41:39: note: mismatched types 'const MArray' and 'mxArray* {aka void*}' elems[i] = new Matrix(ptrs[i],h,w); ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:36:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:72:3: note: candidate: Matrix::Matrix(const Matrix&) Matrix (const Matrix& a) : NDArray (a) { } ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:72:3: note: candidate expects 1 argument, 3 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:69:3: note: candidate: Matrix::Matrix(const dim_vector&, double) Matrix (const dim_vector& dv, double val) ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:69:3: note: candidate expects 2 arguments, 3 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:67:3: note: candidate: Matrix::Matrix(const dim_vector&) Matrix (const dim_vector& dv) : NDArray (dv.redim (2)) { } ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:67:3: note: candidate expects 1 argument, 3 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:64:3: note: candidate: Matrix::Matrix(octave_idx_type, octave_idx_type, double) Matrix (octave_idx_type r, octave_idx_type c, double val) ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:64:3: note: conversion of argument 1 would be ill-formed: arrayofmatrices.cpp:41:34: error: invalid conversion from 'mxArray* {aka void*}' to 'octave_idx_type {aka long long int}' [-fpermissive] elems[i] = new Matrix(ptrs[i],h,w); ~~~~~~^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:36:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:61:3: note: candidate: Matrix::Matrix(octave_idx_type, octave_idx_type) Matrix (octave_idx_type r, octave_idx_type c) ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:61:3: note: candidate expects 2 arguments, 3 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:59:3: note: candidate: Matrix::Matrix() Matrix (void) : NDArray () { } ^~~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/dMatrix.h:59:3: note: candidate expects 0 arguments, 3 provided arrayofmatrices.cpp:42:24: error: no match for 'operator[]' (operand types are 'const ArrayOfMatrices' and 'int') *elems[i] = *source[i]; ^ arrayofmatrices.cpp: In constructor 'ArrayOfMatrices::ArrayOfMatrices(double*, const ArrayOfMatrices&)': arrayofmatrices.cpp:51:33: error: 'octave_idx_type Array::length() const [with T = Matrix*; octave_idx_type = long long int]' is deprecated: [4.4]: use 'numel' instead [-Werror=deprecated-declarations] : Array(model.length()) { ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:357:19: note: declared here octave_idx_type length (void) const { return numel (); } ^~~~~~ arrayofmatrices.cpp:51:34: error: no matching function for call to 'Array::Array(octave_idx_type)' : Array(model.length()) { ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:296:3: note: candidate: Array::Array(const Array&) [with T = Matrix*] Array (const Array& a) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:296:3: note: no known conversion for argument 1 from 'octave_idx_type {aka long long int}' to 'const Array&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:289:3: note: candidate: template Array::Array(const Array&) Array (const Array& a) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:289:3: note: template argument deduction/substitution failed: arrayofmatrices.cpp:51:34: note: mismatched types 'const Array' and 'octave_idx_type {aka long long int}' : Array(model.length()) { ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:285:3: note: candidate: template class Container> Array::Array(const Container&, const dim_vector&) Array (const Container& a, const dim_vector& dv); ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:285:3: note: template argument deduction/substitution failed: arrayofmatrices.cpp:51:34: note: can't deduce a template for 'const Container' from non-template type 'octave_idx_type {aka long long int}' : Array(model.length()) { ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:281:3: note: candidate: Array::Array(const Array&, const dim_vector&) [with T = Matrix*] Array (const Array& a, const dim_vector& dv); ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:281:3: note: candidate expects 2 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:271:12: note: candidate: Array::Array(const dim_vector&, const T&) [with T = Matrix*] explicit Array (const dim_vector& dv, const T& val) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:271:12: note: candidate expects 2 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:262:12: note: candidate: Array::Array(const dim_vector&) [with T = Matrix*] explicit Array (const dim_vector& dv) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:262:12: note: no known conversion for argument 1 from 'octave_idx_type {aka long long int}' to 'const dim_vector&' C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:254:3: note: candidate: Array::Array() [with T = Matrix*] Array (void) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:254:3: note: candidate expects 0 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:246:3: note: candidate: Array::Array(T*, octave_idx_type, octave_idx_type*, void*) [with T = Matrix*; octave_idx_type = long long int] Array (T *sdata, octave_idx_type slen, octave_idx_type *adims, void *arep) ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:246:3: note: candidate expects 4 arguments, 1 provided C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:231:3: note: candidate: Array::Array(const Array&, const dim_vector&, octave_idx_type, octave_idx_type) [with T = Matrix*; octave_idx_type = long long int] Array (const Array& a, const dim_vector& dv, ^~~~~ C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:231:3: note: candidate expects 4 arguments, 1 provided arrayofmatrices.cpp:52:3: error: 'setvalue' was not declared in this scope setvalue(0); ^~~~~~~~ arrayofmatrices.cpp:52:3: note: suggested alternative: 'setvbuf' setvalue(0); ^~~~~~~~ setvbuf arrayofmatrices.cpp:55:23: error: 'n' was not declared in this scope for (int i = 0; i < n; i++) { ^ arrayofmatrices.cpp:56:28: error: no match for 'operator[]' (operand types are 'const ArrayOfMatrices' and 'int') const Matrix* A = model[i]; ^ arrayofmatrices.cpp:57:5: error: 'elems' was not declared in this scope elems[i] = new Matrix(data,A->height(),A->width()); ^~~~~ arrayofmatrices.cpp:57:5: note: suggested alternative: 'elem' elems[i] = new Matrix(data,A->height(),A->width()); ^~~~~ elem arrayofmatrices.cpp:57:42: error: 'const class Matrix' has no member named 'height' elems[i] = new Matrix(data,A->height(),A->width()); ^~~~~~ arrayofmatrices.cpp:57:54: error: 'const class Matrix' has no member named 'width' elems[i] = new Matrix(data,A->height(),A->width()); ^~~~~ arrayofmatrices.cpp:58:33: error: 'octave_idx_type Array::length() const [with T = double; octave_idx_type = long long int]' is deprecated: [4.4]: use 'numel' instead [-Werror=deprecated-declarations] data += A->length(); ^ In file included from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array-util.h:28:0, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MSparse.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/MatrixType.h:29, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/mx-base.h:30, from C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/matrix.h:31, from arrayofmatrices.cpp:2: C:\Octave\OCTAVE~1.0\mingw64\include\octave-5.1.0\octave/Array.h:357:19: note: declared here octave_idx_type length (void) const { return numel (); } ^~~~~~ arrayofmatrices.cpp: In destructor 'virtual ArrayOfMatrices::~ArrayOfMatrices()': arrayofmatrices.cpp:63:23: error: 'n' was not declared in this scope for (int i = 0; i < n; i++) ^ arrayofmatrices.cpp:64:9: error: 'elems' was not declared in this scope if (elems[i]) ^~~~~ arrayofmatrices.cpp:64:9: note: suggested alternative: 'elem' if (elems[i]) ^~~~~ elem arrayofmatrices.cpp: In member function 'int ArrayOfMatrices::numelems() const': arrayofmatrices.cpp:72:23: error: 'n' was not declared in this scope for (int i = 0; i < n; i++) ^ arrayofmatrices.cpp:73:10: error: 'elems' was not declared in this scope m += elems[i]->length(); ^~~~~ arrayofmatrices.cpp:73:10: note: suggested alternative: 'elem' m += elems[i]->length(); ^~~~~ elem arrayofmatrices.cpp: In member function 'ArrayOfMatrices& ArrayOfMatrices::operator=(const ArrayOfMatrices&)': arrayofmatrices.cpp:81:23: error: 'n' was not declared in this scope for (int i = 0; i < n; i++) ^ arrayofmatrices.cpp:82:6: error: 'elems' was not declared in this scope *elems[i] = *source.elems[i]; ^~~~~ arrayofmatrices.cpp:82:6: note: suggested alternative: 'elem' *elems[i] = *source.elems[i]; ^~~~~ elem arrayofmatrices.cpp:82:25: error: 'const class ArrayOfMatrices' has no member named 'elems'; did you mean 'elem'? *elems[i] = *source.elems[i]; ^~~~~ elem cc1plus.exe: all warnings being treated as errors make: *** [Makefile:23: arrayofmatrices.o] Error 1