set用法小例
来源:互联网 发布:intent获取数据 编辑:程序博客网 时间:2024/06/15 13:58
输入一个字符串,统计该字符串的字符
#include <iostream>
#include <string>#include <set>
using namespace std;
void main()
{
string str;
getline(cin, str);
set<char> charSet;
for (int i = 0; i < str.size(); ++i)
{
charSet.insert(str[i]);
}
for (set<char>::const_iterator it = charSet.begin(); it != charSet.end(); ++it)
{
cout << *it << endl;
}
}
0 0
- set用法小例
- set()的用法小介
- set()的用法小介
- set&&<set> 用法整理
- set 用法
- set用法
- set 用法
- Set用法
- set用法
- set用法
- set用法
- Promise用法小例
- jstl之set与out小例
- SET XACT_ABORT 的用法
- SET NOCOUNT 的用法
- SET ANSI_NULLS的用法
- SET IDENTITY_INSERT的用法
- SET CONCAT_NULL_YIELDS_NULL的用法
- Merge Intervals
- android stdio中的project和module的概念
- 菜鸟的Linux历程-学习大纲
- 更改hive的日志级别
- C++ 中STL map 详解
- set用法小例
- 常见的数据结构的优缺点
- Star Schema完全参考手册读书笔记二
- 《深入理解Linux网络技术内幕》阅读笔记(十三)
- Android Custom View---Floating Action Button Menu
- UVA10001按照一定的规则三位一体转化字符串,给定字符串看能否转化出
- Metasloit渗透测试魔鬼训练营
- 依赖、关联、聚合和组合区别
- web服务器缓存(二)