background image

    #include <numeric>

      

    #include <algorithm>

      

    using namespace std;

      

    //创建一个 list 容器的实例 LISTINT

      

    typedef list<int> LISTINT;

      

    //创建一个 list 容器的实例 LISTCHAR

      

    typedef list<char> LISTCHAR;

      

    void main(void)

      

    {

      

    //--------------------------

      

    //用 list 容器处理整型数据

      

    //--------------------------

      

    //用 LISTINT 创建一个名为 listOne 的 list 对象

      

    LISTINT listOne;