#include
#include
#include
#include
using namespace std;
//创建一个list容器的实例LISTCHAR
typedef list LISTCHAR;
int main(int argc, char* argv[])
{
//用LISTCHAR创建一个名为listOne的list对象
LISTCHAR listTwo;
//声明i为迭代器
LISTCHAR::iterator j;
//从前面向listTwo容器中添加数据
listTwo.push_front ("A123");
listTwo.push_front ("B123");
//从前向后显示listTwo中的数据
cout
关注
打赏