• <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>
            獨立博客: 哲學(xué)與程序

            哲學(xué)與程序

            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 哲學(xué)與程序 閱讀(213) 評論(0)  編輯 收藏 引用 所屬分類: C++ STL

            導(dǎo)航

            公告

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

            常用鏈接

            隨筆分類(37)

            隨筆檔案(41)

            Algorithm

            最新隨筆

            搜索

            最新評論

            獨立博客: 哲學(xué)與程序
            狠狠色丁香久久婷婷综合图片| 婷婷久久综合九色综合98| 91久久精品91久久性色| 国产L精品国产亚洲区久久 | 欧美久久久久久| 伊人久久免费视频| 中文精品99久久国产 | 亚洲欧美日韩精品久久亚洲区 | 久久久精品一区二区三区| 久久99精品国产99久久6| AV狠狠色丁香婷婷综合久久| 国产成人久久精品一区二区三区 | 亚洲日本va午夜中文字幕久久 | 色成年激情久久综合| 狠狠色婷婷久久一区二区| 97久久精品人人做人人爽| 中文无码久久精品| 久久婷婷是五月综合色狠狠| 狠狠久久综合伊人不卡| 久久99国产精品久久| 国产欧美久久一区二区| 麻豆精品久久久久久久99蜜桃| 久久久久久久综合日本亚洲| 久久精品亚洲中文字幕无码麻豆| 亚洲中文字幕无码久久2020| 久久精品成人免费国产片小草| 国产精品久久久久久久久久影院| 91秦先生久久久久久久| 久久福利青草精品资源站| 久久国产色AV免费观看| 色偷偷88888欧美精品久久久| 99久久婷婷国产一区二区| 国产精品久久久久久搜索| 久久久久久国产精品无码超碰| 天天爽天天狠久久久综合麻豆| 久久香蕉国产线看观看乱码| 久久久噜噜噜久久中文福利| 久久亚洲AV成人出白浆无码国产 | 伊人久久大香线蕉亚洲| 浪潮AV色综合久久天堂| 99精品久久精品一区二区|