remove_if throw error when trying to remove white space
<p>I am trying to delete white spaces from the string. but got throw an error.</p>

<p>Which parameter did my code do wrong.. thanks for looking</p>

<p>My main function</p>

<pre><code>#include &lt;algorithm&gt;
#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;vector&gt;
#include &lt;string&gt;
#include &lt;sstream&gt;
using namespace std;


int main()
{
    string myText;
    myText = readText("file.txt");
    myText.erase(remove_if(myText.begin(), myText.end(), isspace), myText.end());
    cout &lt;&lt; myText &lt;&lt; endl;

    return 0;
}
</code></pre>

<p>Below is the error appear when I try compile.</p>

<pre><code>encrypt.cpp: In function ‘int main()’:
encrypt.cpp:70:70: error: no matching function for call to ‘remove_if(std::basic_string&lt;char&gt;::iterator, std::basic_string&lt;char&gt;::iterator, &lt;unresolved overloaded function type&gt;)’
encrypt.cpp:70:70: note: candidate is:
/usr/include/c++/4.6/bits/stl_algo.h:1131:5: note: template&lt;class _FIter, class _Predicate&gt; _FIter std::remove_if(_FIter, _FIter, _Predicate)
</code></pre>
