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

            導航

            公告

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

            常用鏈接

            隨筆分類(37)

            隨筆檔案(41)

            Algorithm

            最新隨筆

            搜索

            最新評論

            獨立博客: 哲學與程序
            色综合久久中文综合网| 国产成人精品久久亚洲高清不卡 国产成人精品久久亚洲高清不卡 国产成人精品久久亚洲 | 91久久成人免费| 99久久国产热无码精品免费久久久久| 亚洲综合精品香蕉久久网97 | 亚洲精品国产自在久久| 2021国内精品久久久久久影院| 国产欧美久久久精品影院| 国产精品青草久久久久婷婷| 久久久久久一区国产精品| 久久精品中文字幕一区| 91精品久久久久久无码| 三上悠亚久久精品| 久久综合九色综合欧美就去吻| 久久综合噜噜激激的五月天| 欧美激情精品久久久久久久九九九 | 久久人爽人人爽人人片AV| 狠狠色综合网站久久久久久久| 无码任你躁久久久久久老妇App| 日本道色综合久久影院| 久久精品卫校国产小美女| 久久e热在这里只有国产中文精品99 | 激情五月综合综合久久69| 久久国产热精品波多野结衣AV| 午夜精品久久久久久| 国内精品伊人久久久久影院对白 | 区亚洲欧美一级久久精品亚洲精品成人网久久久久 | 国产午夜福利精品久久| 久久超乳爆乳中文字幕| AV无码久久久久不卡蜜桃| 午夜视频久久久久一区| 岛国搬运www久久| 国产精品久久久久久福利漫画| 国产成人精品综合久久久久 | 久久99精品国产麻豆宅宅| 久久久久久一区国产精品| 亚洲成人精品久久| 久久99精品国产麻豆宅宅| 国产精品一区二区久久精品| 精品久久久久中文字幕日本| 国产情侣久久久久aⅴ免费|