E2(a)
int Stack::size()const
{
Node *p=top_node;
int count=0;
while(p!=NULL)
{
p=p->next;
count++;
}
return count;
}
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;
}