#include <iostream>
#include <set>
#include <string>
using namespace std;
int main()
{
set<string> setObject;
setObject.insert("A");
setObject.insert("B");
setObject.insert("C");
setObject.insert("D");
set<string>::iterator p = setObject.begin();
do {
cout << *p << " ";
p++;
} while(p != setObject.end());
cout << endl;
p = setObject.find("C");
if(p != setObject.end())
cout << "Found a C\n";
return 0;
}
|