0
4

1 回答 1

1

I think it's your declarations which are causing the problem:

friend ostream & operator << (ostream & out, const term & object);

and

ostream & operator << (ostream & out, const Polynomial & object);

These don't match. One is using a term object and the latter is using a Polynomial object. I'm assuming you want this function to use a term object because the function uses data memebers specific to the struct term. So change the latter to accept a term object:

ostream & operator << (ostream & out, const term & object);
于 2012-11-29T22:26:54.233 回答