int Stack::size()const { Node*p=top_node; int count=0; while(p!=NULL) {p=p->next; count++; } return count; }