Guest User

Untitled

a guest
Oct 19th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include<iostream>
  2. #include"list.h"
  3. ostream& operator<<(ostream& os, IntList& il)
  4. {
  5. Node *ptr = il.first;
  6. while (ptr != 0) {
  7. os << ptr->data << " "; ptr = ptr->link;}
  8. os << endl;
  9. return os;
  10. }
  11.  
  12. void IntList::Push_Back(int e) {
  13. if (!first)
  14. first = last = new Node(e);
  15. else {
  16. last->link = new Node(e);
  17. last = last->link;
  18. }
  19. }
  20. // int IntList::()// 맨 앞 성분 return
  21. // void IntList::Pop_Front() // 맨 앞 노드 제거
  22. // void IntList::Push_Front(int e) // 맨 앞에 노드 추가
  23. // void IntList::Insert(int e) // 정렬된 리스트에 새 노드 추가
Add Comment
Please, Sign In to add comment