首页 > 其他 > 详细

list

时间:2020-06-03 22:44:06      阅读:59      评论:0      收藏:0      [点我收藏+]
 1  list<int> ll;
 2     ll.push_back(12);// 在末尾添加元素
 3     ll.push_front(10);// 在开头添加元素
 4     ll.back();// 读取末尾元素
 5     ll.front();// 读取开头元素
 6     ll.push_back(12);
 7     ll.unique();// 删除重复元素
 8     cout<<ll.size()<<endl;
 9     ll.pop_front();// 在末尾删除元素
10     ll.pop_back();// 在开头删除元素
11 
12     return 0;

 

list

原文:https://www.cnblogs.com/zhmlzhml/p/13040277.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!