title: find not working while I am trying to create a vector containing unique elements in c++
body: <p>Find not working while I am trying to create a vector containing unique elements.</p>
  
  <p>The string is first tokenized and then it need to be reversed. but elememts in reversed string must be unique.</p>
  
  <pre><code>   #include &lt;cstring&gt;
      #include &lt;vector&gt;
      #include &lt;algorithm&gt;
      #include &lt;iostream&gt;
      using namespace std;
      int main()
      {
          vector&lt;char *&gt; myvec;
          string input;
          getline(cin,input);
          char *token = std::strtok((char *)input.c_str()," ");
          while (token != NULL)
          {
              if(find(myvec.begin(), myvec.end(), token)  != myvec.end())
                cout&lt;&lt; "\n Skipping duplicate";
              else
                myvec.push_back(token);
              token = std::strtok(NULL, " ");
          }
          cout&lt;&lt;endl;
          while (!myvec.empty())
          {
            cout&lt;&lt;myvec.back();
            myvec.pop_back();
            cout&lt;&lt;" ";
          }
      cout&lt;&lt;endl;
      }
  
      Input: A bird came down the walk down END
      Output: END down walk the down came bird A
  
     Down should be removed from output as it is duplicate word.
  </code></pre>