基本用法 C++提供了list容器,这是一个双向链表,能高效进行数据添加和删除。 引入头文件 #include <iostream> #include <list> // 引入list头文件 using namespace std; 创建和初始化 list