set_desort

This commit is contained in:
Kolan Sh 2011-08-11 23:19:23 +04:00
parent 0ba66324e3
commit 56d38274e9
1 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,21 @@
#include <set>
#include <iostream>
#include <string>
using namespace std;
int main(void)
{
char *m[] = {"slkdjfs", "klsdjf", "lskdjfl", "lskdjf", "lskdjfl", "iogsfdneowrf", "oisdisjfwe", "qwldjsdj", "fsoiosjfs"};
set<string> s;
for (size_t i = 0, max_i = sizeof(m) / sizeof(char *); i < max_i; i++)
s.insert(m[i]);
for (set<string>::const_iterator it = s.begin(); it != s.end(); it++)
cout << it->c_str() << endl;
return 0;
}