STL_set——set::size
来源:互联网 发布:python 字典 append 编辑:程序博客网 时间:2024/06/05 08:23
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 length is now 2.
Returns the number of elements in the set.
Function:
size_type size( ) const;
Return Value:
The current length of the set.
Example:
#include <set>#include <iostream>int main( ){ using namespace std; set <int> s1; set <int> :: size_type i; s1.insert( 1 ); i = s1.size( ); cout << "The set length is " << i << "." << endl; s1.insert( 2 ); i = s1.size( ); cout << "The set length is now " << i << "." << endl;}
Output:
The set length is 1.
The set length is now 2.
0 0
- STL_set——set::size
- STL_set——set::begin
- STL_set——set::clear
- STL_set——set::count
- STL_set——set::empty
- STL_set——set::end
- STL_set——set::equal_range
- STL_set——set::erase
- STL_set——set::find
- STL_set——set::insert
- STL_set
- stl_set
- STL_set
- stl_set
- STL_set
- Skype—set font size —in CentOS/Fedora/RHEL—修改Skype字体大小
- set history size
- Set VNC View Size
- libGDX screen game 多界面游戏
- linux 内存管理3
- 并查集总结
- ELF文件解析之 ELF头 程序头表 节头表-补充之前文章代码 只支持32位 出版
- 编程算法 - 最长上升子序列问题 代码(C)
- STL_set——set::size
- 01背包水题篇之HDU3466——Proud Merchants
- python常用的可框架
- HBase Random Read性能测试
- HDU3694 四边形的费马点
- linux 内存管理 红黑树(未读)
- Spark上矩阵运算库(二)—— 矩阵相乘测试
- git常见操作
- STL_map——map::begin