Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include"NODE.h"
- #include"LL.h"
- using namespace std;
- LL::LL(){
- hol=NULL;
- size=0;
- }
- LL::~LL(){
- NODE *t=hol;
- int i;
- for(i=0;i<size;i++)
- {
- delete t;
- t=t->move_next();
- }
- }
- void LL::show_all(){
- NODE* t=hol;
- int i;
- for(i=0;i<size;i++){
- t->show_node();
- t=t->move_next();
- }
- }
- void LL::add_node(NODE *&A){
- hol->insert(A);
- hol=A;
- size++;
- }
Add Comment
Please, Sign In to add comment