string strs[] = {"this","is","a","happy","ending","of","the","story","just","so","this","lyn","lyn","happy","zc"}; vector<string> vs(strs,strs+15); unique(vs.begin(),vs.end()); for(vector<string>::iterator vi = vs.begin();vi!=vs.end();vi++) cout << *vi << "\t;
原文:http://www.cnblogs.com/buptlyn/p/3619810.html