#include <iostream>
#include <xutility>
#include <algorithm>
#include "Node.hpp"
#include "ListIterator.hpp"
#include "List.hpp"
using namespace STD; // 내가 만든 STL의 요소
int main()
{
List<> s; // Single Linked List
List<int, DNode<int>> d; // Double linked List
s.push_back(10);
s.push_back(12);
d.push_back(13);
d.push_back(14);
std::for_each( s.begin(), s.end(), [](int a) { std::cout << a << std::endl; } );
std::for_each( d.begin(), d.end(), [](int a) { std::cout << a << std::endl; } );
}
'C++' 카테고리의 다른 글
STL 요소 만들어보기(3) (0) | 2012.11.16 |
---|---|
STL 요소 만들어보기(2) (0) | 2012.11.16 |
STL 요소 만들어보기(1) (0) | 2012.11.16 |
[C++] template을 사용하여 연결리스트 구현 (0) | 2012.11.16 |
[C++0x] Move Operator (0) | 2012.11.16 |