Removing once from c++ List
<p>I have the following example: </p>

<pre><code>// remove from list
#include &lt;iostream&gt;
#include &lt;list&gt;
using namespace std;

int main ()
{
  int myints[]= {17,89,89,7,14};
  list&lt;int&gt; mylist (myints,myints+5);

  mylist.remove(89);

  cout &lt;&lt; "mylist contains:";
  for (list&lt;int&gt;::iterator it=mylist.begin(); it!=mylist.end(); ++it)
        cout &lt;&lt; " " &lt;&lt; *it;
  cout &lt;&lt; endl;

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

<p>The result is: </p>

<pre><code>17, 7, 14
</code></pre>

<p>The problem with this is that it removes both instances of 89. 
Is there any easy way to just remove one instance of 89?</p>
