• <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>
            獨(dú)立博客: 哲學(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é)與程序 閱讀(209) 評論(0)  編輯 收藏 引用 所屬分類: C++ STL

            導(dǎo)航

            公告

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

            常用鏈接

            隨筆分類(37)

            隨筆檔案(41)

            Algorithm

            最新隨筆

            搜索

            最新評論

            獨(dú)立博客: 哲學(xué)與程序
            色狠狠久久AV五月综合| 中文字幕无码久久人妻| 青青草原综合久久大伊人| 综合网日日天干夜夜久久| 亚洲精品高清国产一久久| 乱亲女H秽乱长久久久| 一本一本久久A久久综合精品| 四虎国产精品成人免费久久| 日韩欧美亚洲综合久久影院Ds | 国产成人久久AV免费| 色诱久久久久综合网ywww| 无码精品久久久久久人妻中字| 亚洲精品无码专区久久久 | 国产毛片欧美毛片久久久 | 久久精品免费全国观看国产| 久久久精品视频免费观看| 久久这里只有精品视频99| 中文国产成人精品久久亚洲精品AⅤ无码精品 | 色播久久人人爽人人爽人人片aV| 久久精品成人欧美大片| 久久久久久A亚洲欧洲AV冫 | 午夜精品久久久久久| 久久AV高潮AV无码AV| 77777亚洲午夜久久多喷| 亚洲狠狠久久综合一区77777 | 久久久久人妻一区精品果冻| 中文字幕无码久久精品青草| 新狼窝色AV性久久久久久| 久久精品国产亚洲77777| 99久久99久久精品国产| 无码8090精品久久一区| 国产午夜免费高清久久影院| 国产精品综合久久第一页| 污污内射久久一区二区欧美日韩 | 亚洲人成伊人成综合网久久久 | 国内精品久久久久久野外| 久久精品无码专区免费| 久久亚洲国产成人精品性色| yellow中文字幕久久网| 久久婷婷五月综合国产尤物app | 亚洲欧洲精品成人久久曰影片|