• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            獨立博客: 哲學與程序

            哲學與程序

            STL 容器Vector

            Vector is a kind of sequence that supports random access iterators. In addition, it supports (amortized) constant time insert and erase operations at the end;
            insert and erase 
            in the middle take linear time. Storage management is handled automatically, though hints can be given to improve efficiency.

            template 
            <class T, template <class U> class Allocator = allocator>
            class vector {
            public:
            // typedefs:
                typedef iterator;
                typedef const_iterator;
                typedef Allocator::pointer pointer;
                typedef Allocator::reference reference;
                typedef Allocator::const_reference const_reference;
                typedef size_type;
                typedef difference_type;
                typedef T value_type;
                typedef reverse_iterator;
                typedef const_reverse_iterator;
            // allocation/deallocation:
                vector();
                vector(size_type n, 
            const T& value = T());
                vector(
            const vector& x);
                template vector(InputIterator first, InputIterator last);
                
            ~vector();
                vector
            & operator=(const vector& x);
                
            void reserve(size_type n);
                
            void swap(vector& x);

            // accessors:
                iterator begin();
                const_iterator begin() 
            const;
                iterator end();
                const_iterator end() 
            const;
                reverse_iterator rbegin();
                const_reverse_iterator rbegin();
                reverse_iterator rend();
                const_reverse_iterator rend();
                size_type size() 
            const;
                size_type max_size() 
            const;
                size_type capacity() 
            const;
                
            bool empty() const;
                reference 
            operator[](size_type n);
                const_reference 
            operator[](size_type n) const
                reference front();
                const_reference front() 
            const;
                reference back();
                const_reference back() 
            const;

            // insert/erase:
                void push_back(const T& x);
                iterator insert(iterator position, 
            const T& x = T());
                
            void insert(iterator position, size_type n, const T& x);
                template
                
            void insert(iterator position, InputIterator first, InputIterator last);
                
            void pop_back();
                
            void erase(iterator position);
                
            void erase(iterator first, iterator last);
            };


            posted on 2011-01-19 22:22 哲學與程序 閱讀(217) 評論(0)  編輯 收藏 引用 所屬分類: C++ STL

            導航

            公告

            歡迎訪問 http://zhexue.sinaapp.com

            常用鏈接

            隨筆分類(37)

            隨筆檔案(41)

            Algorithm

            最新隨筆

            搜索

            最新評論

            獨立博客: 哲學與程序
            99精品久久精品一区二区| 久久综合欧美成人| 久久精品国产2020| 国内精品久久久久伊人av| 久久精品国产一区二区| 久久人人爽人人爽人人爽| Xx性欧美肥妇精品久久久久久| 久久人人爽人人爽人人片AV东京热| 亚洲AV无码久久精品成人 | 精品久久国产一区二区三区香蕉 | 亚洲国产天堂久久综合| 日日躁夜夜躁狠狠久久AV| 久久精品二区| 精品久久久久久中文字幕| 精品一二三区久久aaa片| 精品久久人人爽天天玩人人妻| 久久久久久久97| 18岁日韩内射颜射午夜久久成人| 久久久久国产精品三级网| 国产精品视频久久久| 国产综合久久久久| 久久99国产综合精品| 久久精品国产色蜜蜜麻豆| 久久夜色精品国产噜噜亚洲a| 久久久久99精品成人片牛牛影视| 中文字幕久久欲求不满| 欧美精品一本久久男人的天堂| 久久九九精品99国产精品| 久久综合精品国产二区无码| 久久久久久久久久久久久久 | 国产高潮国产高潮久久久| 亚洲va中文字幕无码久久不卡| 久久综合亚洲鲁鲁五月天| 久久人人超碰精品CAOPOREN| 久久精品一区二区三区中文字幕| 99久久精品无码一区二区毛片| 国产精品欧美亚洲韩国日本久久 | 伊人热人久久中文字幕| 精品99久久aaa一级毛片| 亚洲国产精品狼友中文久久久 | 亚洲综合伊人久久综合|