This is my code:
struct Term{
int coeff;
int expo;
Term* next;
friend ostream& operator<<(ostream& os, const Term& rt);
};
class Polynomial{
public:
Term *head;
Polynomial();
friend ostream& operator<<(ostream& os, const Polynomial& a_poly);
};
How can I use use the operator<< function defined for the Term struct inside operator << function defined for Polynomial Class ?
Aucun commentaire:
Enregistrer un commentaire