Subtract one vector from another
<p>I organized two vectors of structures. Now I need to delete what is in <em>chosen</em> from <em>points</em>.</p>

<pre><code>#include &lt;StdAfx.h&gt;;
#include &lt;iostream&gt;;
#include &lt;vector&gt;;

using namespace std;
struct SPoint
{
    int id;
    int X;
    int Y;
};

vector&lt;SPoint&gt; points;
vector&lt;SPoint&gt; chosen;

void print_vect(const vector&lt;SPoint&gt; &amp; vect)
{
    for (int i = 0; i &lt; vect.size(); ++i)
    {
        cout &lt;&lt; vect[i].id &lt;&lt; " (" &lt;&lt; vect[i].X &lt;&lt; "," &lt;&lt; vect[i].Y &lt;&lt; ")"&lt;&lt;endl;               
    }           

    cout &lt;&lt; endl;   
}

int _tmain(int argc, _TCHAR* argv[])
{
    SPoint temp;
    for (int i = 0; i &lt; 10; i++)
    {
        temp.id = i;
        temp.X = i;
        temp.Y = i;
        points.push_back(temp);
    }

    for (int i = 5; i &lt; 10; i++)
    {
        temp.id = i;
        temp.X = i;
        temp.Y = i;
        chosen.push_back(temp);
    }

    cout &lt;&lt; "Points:" &lt;&lt; endl;
    print_vect(points);
    cout &lt;&lt; endl &lt;&lt; endl;

    cout &lt;&lt; "Chosen:" &lt;&lt; endl;
    print_vect(chosen);

    system("pause");

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

<p>There seems to be set_difference function. But the debugger tells me that I don't have a '&lt;' method. It tells something like this:</p>

<pre><code>error C2784: 'bool std::operator &lt;(const std::move_iterator&lt;_RanIt&gt; &amp;,const std::move_iterator&lt;_RanIt2&gt; &amp;)' : could not deduce template argument for 'const std::move_iterator&lt;_RanIt&gt; &amp;' from 'SPoint
</code></pre>

<p>I study procedural programming in C++. And I don't know what to do with this method. And it seems to me that it is impossible to do anything here with "&lt;".</p>

<p>Could you help me execute the subtraction?</p>
