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

            導航

            公告

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

            常用鏈接

            隨筆分類(37)

            隨筆檔案(41)

            Algorithm

            最新隨筆

            搜索

            最新評論

            獨立博客: 哲學與程序
            无码人妻久久一区二区三区免费| 97久久久久人妻精品专区| 久久er国产精品免费观看2| 国产成年无码久久久免费| 亚洲色欲久久久综合网东京热| 久久久久亚洲av综合波多野结衣 | 久久久久久久亚洲精品| 亚洲一本综合久久| 久久综合伊人77777| 亚洲欧美日韩中文久久| 日本道色综合久久影院| 亚洲国产日韩欧美久久| 久久久噜噜噜久久熟女AA片| 精品久久国产一区二区三区香蕉 | 久久精品国产清自在天天线| 久久久久亚洲av无码专区喷水| 99久久无色码中文字幕| 日日狠狠久久偷偷色综合免费| 久久亚洲AV成人无码电影| 久久久久久久久久久免费精品| 亚洲午夜无码久久久久| 国产99久久久久久免费看| 亚洲精品乱码久久久久久蜜桃图片 | 国产精品免费久久久久影院 | 国产精品久久成人影院| 99久久精品免费看国产| 免费久久人人爽人人爽av| 久久久中文字幕| 色欲av伊人久久大香线蕉影院| 中文字幕久久欲求不满| 久久久国产精品亚洲一区| 伊人久久大香线蕉精品不卡| 97久久超碰国产精品旧版| 97视频久久久| 亚洲国产一成久久精品国产成人综合| 成人资源影音先锋久久资源网| 国产精品久久久久免费a∨| 久久精品国产亚洲AV不卡| 国产精品久久久久9999| 久久青青色综合| 偷偷做久久久久网站|