Friday, February 22, 2013

linked list revisited


#include<list>
#include<iterator>
#include<iostream>
using namespace std;
void TestList()
{
list<int> L;
L.push_back(0);
L.push_front(1);
L.insert(++L.begin(),2);
copy(L.begin(),L.end(),ostream_iterator<int>(cout," "));
}

No comments:

Post a Comment