title: Quickly find all elements not in a vector c++
body: <p>I have a vector of points <code>allPoints</code> and a vector of points <code>badPoints</code>. I want to quickly get a set of <code>goodPoints</code> where it is everything in allPoints that is not in badPoints. Currently I have:</p>
  
  <pre><code>    int i = 0;
      for (auto point : allPoints)
      {
          bool add = true;
          for (auto x : badPoints)
          {
              if (point == x)
              {
                  add = false;
                  break;
              }
          }
          if (add)
          {
              goodPoints.insert(point);
          }
          i++;
      }
  </code></pre>
  
  <p>I feel like this is slower than it should be but I don't know a better way to do it. Any ideas?</p>