Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Node* e = new Node();
- Node* b = new Node();
- Node* c = new Node();
- Node* d = new Node();
- Node* f = new Node();
- Node* g = new Node();
- e->a = 5;
- b->a = 10;
- c->a = 25;
- d->a = 50;
- f->a = 39;
- g->a = 18;
- Lijst* rij = new Lijst();
- Lijst* zij = new Lijst();
- rij->print();
- rij->add(e);
- rij->print();
- rij->add(1,b);
- rij->print();
- rij->addFirst(c);
- rij->print();
- rij->addLast(f);
- rij->print();
- rij->clear();
- rij->print();
- rij->add(e);
- rij->print();
- rij->add(1,b);
- rij->print();
- rij->addFirst(c);
- rij->print();
- std::cout<<"test"<<std::endl;
- rij->addLast(f);
- rij->print();
- std::cout<<"test"<<std::endl;
- std::cout<<rij->get(2)->a;
- std::cout<<std::endl<<"testje"<<std::endl;
- std::cout<<rij->getFirst()->a;
- std::cout<<std::endl;
- std::cout<<rij->getLast()->a<<std::endl;
- std::cout<<"testen"<<std::endl;
- rij->print();
- rij->add(g);
- rij->print();
- std::cout<<"qsdf"<<std::endl;
- rij->removeFirst();
- rij->print();
- std::cout<<"klm"<<std::endl;
- rij->print();
- std::cout<<"qsdf"<<std::endl;
- rij->print();
- std::cout<<"mlk"<<std::endl;
- zij->add(c);
- zij->print();
- zij->add(b);
- zij->print();
- zij->add(d);
- zij->print();
- zij->removeFirst();
- zij->print();
- std::cout<<"qsdf"<<std::endl;
- std::cout<<zij->size()<<std::endl;
- std::cout<<"test contain"<<std::endl;
- std::cout<<zij->contains(14)<<std::endl;
- std::cout<<zij->contains(10)<<std::endl;
- std::cout<<zij->contains(25)<<std::endl;
- //hier gaat ie fout? removeLAST?? WERKT NI THE **** ?
- zij->removeLast();
- zij->print();
- zij->add(f);
- zij->add(g);
- zij->add(e);
- zij->print();
- std::cout<<"test"<<std::endl;
- zij->remove(2);
- std::cout<<"qsdf"<<std::endl;
- zij->print();
Add Comment
Please, Sign In to add comment