Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include"list.h"
- ostream& operator<<(ostream& os, IntList& il)
- {
- Node *ptr = il.first;
- while (ptr != 0) {
- os << ptr->data << " "; ptr = ptr->link;}
- os << endl;
- return os;
- }
- void IntList::Push_Back(int e) {
- if (!first)
- first = last = new Node(e);
- else {
- last->link = new Node(e);
- last = last->link;
- }
- }
- // int IntList::()// 맨 앞 성분 return
- // void IntList::Pop_Front() // 맨 앞 노드 제거
- // void IntList::Push_Front(int e) // 맨 앞에 노드 추가
- // void IntList::Insert(int e) // 정렬된 리스트에 새 노드 추가
Add Comment
Please, Sign In to add comment