• <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é)與程序
            久久久久久久久久久| 伊人色综合九久久天天蜜桃| 国产成人久久精品激情| 99久久精品费精品国产| 精品久久久久久无码中文野结衣 | 成人a毛片久久免费播放| 欧美激情精品久久久久久| 亚洲国产另类久久久精品| 国内精品久久久久久久久| 色偷偷偷久久伊人大杳蕉| 国产亚州精品女人久久久久久 | 国产精自产拍久久久久久蜜| 亚洲精品无码久久久| 青青青伊人色综合久久| 色偷偷偷久久伊人大杳蕉| 亚洲伊人久久综合影院| 国产亚洲色婷婷久久99精品91| 久久久噜噜噜久久熟女AA片| 久久久无码精品午夜| 久久中文字幕一区二区| 国产亚洲精品美女久久久| 久久精品国产清自在天天线| 青青久久精品国产免费看| 99久久国产综合精品网成人影院 | 久久国产成人亚洲精品影院| 99久久无色码中文字幕| 久久久久亚洲AV无码麻豆| 亚洲香蕉网久久综合影视 | 亚洲另类欧美综合久久图片区| 亚洲一本综合久久| 久久久久四虎国产精品| 国产精品久久久久…| 久久中文字幕无码专区| 久久综合亚洲色HEZYO社区| 久久精品国产AV一区二区三区| 91精品国产综合久久香蕉| 久久久久亚洲精品天堂久久久久久| 91精品国产乱码久久久久久| 久久久久国产一级毛片高清板| 国内精品久久久人妻中文字幕| 久久久久久亚洲Av无码精品专口|