this is what I made for a = operator:
matrix matrix::operator= (double a[])
{
for (int i = 0; i < rows * clms; i++){
//std::cout << i<< "=" <<a[i] << " ";
*(x +i) = a[i];
//std::cout << i<< "=" <<x[i] << " ";
}
return *this;
}
and I try to use it with this
matrix m(3);
double a[12] = { 16,2,3,13,5,11,10,8,9,7,6,12};
m = a;
but if you try it you will see that it only changes the value for the scope of the = operator function. Any ideas?