http://blog.csdn.net/ly21st http://ly21st.blog.chinaunix.net
分类: C/C++
2011-11-24 08:19:43
using namespace std;
int main()
{
list
for(list
list1.push_back(i);
copy(list1.begin(),list1.end(),front_inserter(list2));
copy(list1.begin(),list1.end(),inserter(list3,list3.begin()));
for(list
cout<<*iter<<" ";
cout<
for(list
cout<<*iter<<" ";
cout<
getchar();
return 0;
}
结果
9 8 7 6 5 4 3 2 1 0
0 1 2 3 4 5 6 7 8 9