P131 E2
int Stack::size() const{
Node* p=top_node;
int count=0;
while (p!=NULL){
p=p->next;
count++;
}
return count;
}
P137 E2
void Stack::operator=(const Stack &original);
{
Stack new_copy(original);
Node*temp=top_node;
top_node=new_copy.top_node;
new_copy.top_node=temp;
}