1、作業: list stack,struct node int info; node* next; ;class list node *head, *tail ; int node_no ;public:list() ;list(const node,使用list產生stack,class stack: public list stack() ;stack() ;operator=(const stack,測試class list,void main() list L1, L2, L3 ;for (int i = 101; i=105; j-) L2.insert(L2.getSize(), j
2、) ;L1.show(“L1=“); L2.show(“L2=“) ;L3 = L1 + L2 ;L3.show(“L3=L1+L2=“) ;L3 = L1 * L2;L3.show(“L3=L1*L2=“) ;L3 = L1 L2;L3.show(“L3=L1-L2=“) ;L3.delete(1) ; L3.delete(2) ; L3.show(“after 2 delete, L3=“) ;stack s1, s2 ;for (int k=1; k=10; k+) if (k%3=0) s1.pop();s1.push(k) ; s1.show(“s1=“) ;s2 = s1;s2.show(“s2=“) ;,輸出結果,