Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // main.cpp
- // 01_singly_linked_list
- //
- // Created by 박대호 on 2016. 10. 27..
- // Copyright © 2016년 박대호. All rights reserved.
- //
- #include "SinglyLinkedList.hpp"
- #include <iostream>
- using namespace std ;
- int main(int argc, const char * argv[]) {
- // insert code here...
- SLL *sll = new SLL();
- sll->print();
- for(int i=0 ; i<5 ; i++)
- sll->push_front(i);
- sll->print();
- sll->remove(6);
- sll->remove(1);
- sll->remove(2);
- sll->print();
- for(int i=0 ; i<3 ; i++)
- sll->pop_front();
- sll->print();
- delete sll ;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement