#include
#include
#include
#include
using namespace std;
typedef vector VECTOR_STRINGS;
int main (){
VECTOR_STRINGS v;
v.push_back ("A");
v.push_back ("B");
v.push_back ("C");
v.push_back ("D");
// insert a duplicate into the vector
v.push_back ("D");
VECTOR_STRINGS::iterator i;
// Erase adjacent duplicates
i = unique (v.begin (), v.end ());
v.erase (i, v.end ());
for (size_t nItem = 0; nItem < v.size (); ++ nItem){
cout << "Name [" << nItem << "] = \"";
cout << v [nItem] << "\"" << endl;
}
return 0;
}