C++ list

 

Source:

 

Result:

 

[work@db-testing-com06-vm3.db01.baidu.com c++]$ g++ -o list list.cpp 

[work@db-testing-com06-vm3.db01.baidu.com c++]$ ./list 

listOne.begin()--- listOne.end():

1 2 3 4 

listOne.rbegin()---listOne.rend():

4 3 2 1 

Sum=10

listTwo.begin()---listTwo.end():

B A x y 

The maximum element in listTwo is: y

 

 

posted @ 2010-11-09 15:08  张长胜  阅读(155)  评论(0编辑  收藏  举报