I think this is a pretty simple problem, but I just can't get it, I have the following class:

I'm trying to implement the Add member but I can't figure out how to access what's in P2Code:class Polynomial { private: int coeff[LEN]; public: Polynomial (); Polynomial Add (const Polynomial& P2) const; Polynomial Subtract (const Polynomial& P2) const; void Print (unsigned wid=0) const; unsigned width () const; void setCoeff (unsigned index, int newCoeff); }; Polynomial::Polynomial() { for (unsigned i=0; i<LEN; i++) { coeff[i]=0; } }

I've tried

and then it gives me complier error "no match for `Polynomial &[unsigned int &]'"Code:Polynomial Polynomial::Add (const Polynomial& P2) const { Polynomial Ptemp; for (unsigned i=0; i<LEN; i++) { Ptemp = coeff[i] + P2[i]; } return Ptemp; }

So I don't know really what to do, any help would be nice