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;