I overloaded the *= operator with this member function:
template<class U>
Matriz<T> & operator*=(const Matriz<U> & valor);
And also I have a constructor to matriz like this:
Matriz(const std::vector<T> & vector);
Well, I would like to make something like this:
double vetor[3] = { 1, 2, 3 };
std::vector<double> vec(vetor, vetor + 3);
Matriz<double> A("src//imatriz.dat"); //Creates a matrix with parameters from a file.
A*=vec;
That is, I would like to multiply a matrix by a vector. The problem is that compiler returns that there is no match for the operator.
---EDIT2---
As suggested, I also tried this:
template<class U>
friend Matriz<T> & operator*=(Matriz<U> & lhs, const Matriz<U> & rhs)
but A*=vec still doesn't work.
Any idea? If you need more code there's no problem to put it here.