title: C++ STL remove error
body: <p>I'm having trouble understanding where I went wrong with my code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  #include &lt;string&gt;
  
  using namespace std;
  
  int main(int argc, char* argv[]) {
      string str = "";
      cin &gt;&gt; str;
      remove(str.begin(), str.end(), ' ');
      cout &lt;&lt; str;
      cin.ignore();
  }
  </code></pre>
  
  <p>The error says "'remove': function does not take 3 arguments (C2660)"</p>