当前位置:网站首页>46.
46.
2022-07-30 23:35:00 【Lee is struggling...】

[Remember, only iterators can be used to operate in the list linked list, and the + symbol cannot be used in the process of deletion]
#include
#include
using namespace std;
int main()
{
int i = 0;
list
list
for (it=list_a.begin();it!=list_a.end();it++)
{
i++;
cout << "Please enter the first"<< i<< "Data" << endl;
cin >> *it;
}
for (it = list_a.begin(); it != list_a.end(); it++)
{
int j = 0;
if (*it == 3)
{
list_a.erase(it, it);
}
else
else
{
cout << *it << " ";
}
}
return 0;
}

边栏推荐
猜你喜欢

In MySQL, the stored procedure cannot realize the problem of migrating and copying the data in the table

Apache Doris系列之:安装与部署详细步骤

电脑快捷方式图标变白解决方案

反转链表-头插反转法

ctfshow 文件包含

Unity 加载读取PPT

边缘计算与小程序也能结合!智能家居是否能借势上台阶
![[MySQL] Related operations on databases and tables in MySQL](/img/a5/c92e0404c6a970a62595bc7a3b68cd.gif)
[MySQL] Related operations on databases and tables in MySQL

Alibaba Cloud video on demand + project combat

PS Basic Learning (1)
随机推荐
leetcode:127. Word Solitaire
2022 China Logistics Industry Conference and Entrepreneur Summit Forum will be held in Hangzhou!
leetcode 406. Queue Reconstruction by Height 根据身高重建队列(中等)
uni-ui安装
Day016 类和对象
Achievements of Science and Technology (31)
2021GDCPC广东省大学生程序设计竞赛 H.History
reindex win10
状态机动态规划之股票问题总结
Axure轮播图
vscode上利用screen命令跑代码
软件测试三阶段,你在哪一步?
10 个关于自动化发布管理的好处
Reverse linked list - head insertion inversion method
PS Basic Learning (1)
Manually set transaction commit in mysql
可视化工具Netron介绍
H5跳转微信公众号解决方案
"Code execution cannot continue because MSVCP140.dll was not found, reinstalling the program may resolve the problem, etc." Solutions
【LeetCode】42. 接雨水 - Go 语言题解