title: Remove elements from two std::vectors based on the first vector's elements
body: <p>I have to vectors with the same amount of elements. I would like to remove the elements of the first vector based on a condition but I would also like to remove from the second vector the elements that are on the same position.</p>
  
  <p>For example, here are two vectors:</p>
  
  <pre><code>std::vector&lt;std::string&gt; first = {"one", "two", "one", "three"}
  std::vector&lt;double&gt; second = {15.18, 14.2, 2.3, 153.3}
  </code></pre>
  
  <p>And what I want is to remove based on the condition if the element is "one". The final outcome is:</p>
  
  <pre><code>std::vector&lt;std::string&gt; first = {"two", "three"}
  std::vector&lt;double&gt; second = {14.2, 153.3}
  </code></pre>
  
  <p>I can remove the elements from <code>first</code> by using:</p>
  
  <pre><code>bool pred(std::string name) {
    return name == "one";
  }
  
  void main() {
  
    std::vector&lt;std::string&gt; first = {"one", "two", "one", "three"}
    first.erase(first.begin(), first.end(), pred);
  
  }
  </code></pre>
  
  <p>But I am not aware of a way to remove elements from the second vector as well.</p>