0

`Matrix & operator+(const Matrix &, const Matrix &);`

this is not the prototype for overloading binary operator.

The proper is

`Matrix & operator+(const Matrix &);`

The other operand for the operation is the calling object.

say

```
Matrix a, b, c;
c = a+b;
```

here the operator + is being invoked by the object **a**.

i.e. **a.operator+(b)**

U have to add the matrix **b** to **a** and return the sum which will get assigned to matrix c.

and what do expect the following statement to do???????????????

`temp(r,c)=s.getelement(r,c)+ t.getelement(r,c)`

You

This article has been dead for over six months: Start a new discussion instead