I have a vector that the user inputs some strings. I want to keep the order that the user inputs but delete any duplicate words. The only thing I could find online is sort and unique but since I cannot sort the vector I am stuck. Thank you in advance for any help.
e.x. input from user -> hello there dog cat hello cat book
vector should have -> hello there dog cat book
right now all I have is...
string s;
vector <string> myVec;
while (cin >> s){
myVec.push_back(s);
}
{code to sort vector}