**2.5 多项式加法、乘法、输入、输出运算符重载
Polynomial.h #pragma once #include<iostream> using namespace std; class Term { friend class Polynomial; public: int a; int x; Term* next; }; class Polynomial { Term* first; public: Polynomial() { first = new Term(); first->x = NULL; first->a = NULL; first->next = nullptr; } void insert(int x, int a) { Term* p; p = first; Term* s; while (p->next != nullptr) { p = p->next; } s = new Term(); s->a = a; s->x = x; s->next = p->next; p->next = s; } int maxE() { Term* p; int max = -999999; p = first->next; while (p != nullptr) { if (p->x > max) { max = p->x; } p = p->next; } return max; } Term*