[ create a new paste ] login | about

Link: http://codepad.org/Z75i2ncF    [ raw code | output | fork ]

hecomi - C++, pasted on Jul 17:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <iostream>
#include <iterator>
#include <algorithm>

int main()
{
	std::list<int> intList;
	std::front_insert_iterator<list<int> > it(intList);
	*it = 10;
	*it = 20;
	*it = 30;
	std::copy(intList.begin(), intList.end(), std::ostream_iterator<int>(cout, "\n"));
	return 0;
}


Output:
1
2
3
30
20
10


Create a new paste based on this one


Comments: