title: Find pointer of object in vector C++
body: <p>I have a class which is called <code>Position</code>:</p>
  
  <pre><code>class Position
  {
      public:
      ... //Constructor, Destructor, ...
  
      private:
  
        signed int x_;
        signed int y_;
  }
  </code></pre>
  
  <p>Then I have a vector which stores pointers of <code>Positions</code>:</p>
  
  <pre><code>std::vector&lt;Position*&gt; positions
  </code></pre>
  
  <p>How can I check if a <code>Position</code> is contained in the vector? For example, I have an object of a <code>Position</code>:</p>
  
  <pre><code>Position* p_ = new Position(0, 0);
  </code></pre>
  
  <p>And I want to check if the vector contains a <code>Position</code> with the same coordinates?
  Which operator do I have to overload?</p>
  
  <p>Thanks,
  Barbara </p>