
STL
luosimuer
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
STL_set——set::erase
Reference: Removes an element or a range of elements in a set from specified positions or removes elements that match a specified key. Function: iterator erase( iterator _Where ); iterato转载 2014-07-20 21:15:49 · 544 阅读 · 0 评论 -
STL_set——set::size
Reference: Returns the number of elements in the set. Function: size_type size( ) const; Return Value: The current length of the set. Example: Output: The set length is 1. The set len转载 2014-07-20 22:16:26 · 585 阅读 · 0 评论 -
STL_set——set::find
Reference: Returns an iterator addressing the location of an element in a set that has a key equivalent to a specified key. Function: iterator find( const Key& _Key ) const; const_iterato转载 2014-07-20 21:32:26 · 539 阅读 · 0 评论 -
STL_map——map::begin
Reference: Returns an iterator addressing the first element in the map. Function: const_iterator begin( ) const; iterator begin( ); Return Value: A bidirectional iterator addressing the firs转载 2014-07-20 22:20:55 · 606 阅读 · 0 评论 -
STL_map——map::end
Reference: Returns an iterator that addresses the location succeeding the last element in a map. Function: const_iterator end( ) const; iterator end( ); Return Value: A bidirectional iterato转载 2014-07-20 22:41:25 · 801 阅读 · 0 评论 -
STL_set——set::clear
Reference: Erases all the elements of a set. Function:转载 2014-07-20 20:23:37 · 619 阅读 · 0 评论 -
STL_set——set::count
Reference: Returns the number of elements in a set whose key matches a parameter-specified key. Function: size_type count( const Key& _Key ) const; Parameter: _Key:The key of the ele转载 2014-07-20 20:33:30 · 710 阅读 · 0 评论 -
STL_set——set::end
Reference: Returns an iterator that addresses the location succeeding the last element in a set. Function: const_iterator end( ) const; iterator end( ); Return Value: A bidirectional ite转载 2014-07-20 20:49:48 · 557 阅读 · 0 评论 -
STL_copy
#include output_iterator copy( input_iterator start, input_iterator end, output_iterator dest ); The copy function copies the elements between start and end to dest. In other words, after copy has转载 2014-07-29 11:38:37 · 509 阅读 · 0 评论 -
pair
class pair可以将两个值视为一个单元,尤其是在map和multimap中使用很多,在这里面就是使用pair来管理key-value的成对元素,此外任何函数需要返回两个值也都需要pair。 关于pair相关的定义和实现在STL源码中的stl_pair.h这个文件中,下面列举一下里面的内容: /* * * Copyright (c) 1994 * Hewlett-Packard Co原创 2014-08-19 16:36:49 · 807 阅读 · 0 评论 -
STL_set——set::insert
Reference: Inserts an element or a range of elements into a set. Function: pair insert( const value_type& _Val ); iterator insert( iterator _Where, const value_type& _Val ); temp转载 2014-07-20 21:45:13 · 665 阅读 · 0 评论 -
STL_set——set::empty
Reference: Tests if a set is empty. Function: bool empty( ) const; Return Value: true if the set is empty; false if the set is nonempty. Example: Output: The set s1 is not empt转载 2014-07-20 20:41:13 · 559 阅读 · 0 评论 -
STL_set——set::equal_range
Reference: Returns a pair of iterators respectively to the first element in a set with a key that is greater than a specified key and to the first element in the set with a key that is equal to or gr转载 2014-07-20 21:01:55 · 866 阅读 · 1 评论 -
STL_set——set::begin
Reference: Returns an iterator that addresses the first element in the set. Function:转载 2014-07-20 19:07:56 · 665 阅读 · 0 评论 -
STL_map——map::clear
Reference: Erases all the elements of a map. Function: void clear( ); Example: Output: The size of the map is initially 2. The size of the map after clearing is 0.转载 2014-07-20 22:23:52 · 1354 阅读 · 0 评论 -
STL_map——map::count
Reference: Returns the number of elements in a map whose key matches a parameter-specified key. Function: size_type count( const Key& _Key ) const; Parameter: _Key:The key value of the e转载 2014-07-20 22:38:47 · 821 阅读 · 0 评论 -
STL_map——map::empty
Reference: Tests if a map is empty. Function: bool empty( ) const; Return Value: true if the map is empty; false if the map is nonempty. Example: Output: The map m1 is not empty. The转载 2014-07-20 22:41:31 · 513 阅读 · 0 评论 -
STL_map——map::equal_range
Reference: Returns a pair of iterators respectively to the first element in a map with a key that is greater than a specified key and to the first element in the map with a key that is equal to or gr转载 2014-07-20 22:48:07 · 1413 阅读 · 0 评论 -
STL_map——map::erase
Reference: Removes an element or a range of elements in a map from specified positions or removes elements that match a specified key. Function: iterator erase( iterator _Where ); iterator转载 2014-07-20 22:49:39 · 475 阅读 · 0 评论 -
STL_map——map::find
Reference: Returns an iterator addressing the location of an element in a map that has a key equivalent to a specified key. Function: iterator find( const Key& _Key ); const_iterator find(转载 2014-07-20 22:52:12 · 603 阅读 · 0 评论 -
STL_map——map::insert
Reference: Inserts an element or a range of elements into a map. Function: pair insert( const value_type& _Val ); iterator insert( iterator _Where, const value_type& _Val ); temp转载 2014-07-20 22:58:20 · 547 阅读 · 0 评论 -
STL_map——map::size
Reference: Returns the number of elements in the map. Function: size_type size( ) const; Return Value: The current length of the map. Example: Output: The map length is 1. The map len转载 2014-07-20 23:00:30 · 569 阅读 · 0 评论 -
string基本用法
构造函数例子#include <iostream> #include <string> using namespace std; int main() { string str("12345678"); char ch[] = "abcdefgh"; string a; //定义一个空字符串 string str_1(str); //全部复制 string st...原创 2018-05-21 16:11:26 · 8052 阅读 · 0 评论