Can i copy 'vector' elements in 'set' using the copy algorithm?
<p>I am getting the run time error in following code. Please let me know can i copy vector elements in set?</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;vector&gt;
#include &lt;set&gt;
using namespace std;
int main()
{
    vector&lt;int&gt; v;
    set&lt;int&gt; kk;
    set&lt;int&gt;::iterator itr;
    for (int i=0; i&lt;6;i++)
    v.push_back(i*2);
    copy(v.begin(), v.end(),inserter(kk, itr));
}
</code></pre>
