Create sets with string elements : set « Set Multiset « C++
- C++
- Set Multiset
- set
Create sets with string elements
#include <set>
#include <iostream>
#include <string>
using namespace std;
template <class T>
void print(T& c){
for( typename T::iterator i = c.begin(); i != c.end(); i++ ){
std::cout << *i << endl;
}
}
int main()
{
set<string> first;
first.insert("r");
first.insert("T");
first.insert("s");
}
Related examples in the same category