A Piece of Code
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
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment