Why should I use back_inserter in the following case?


  • 0
    Y

    I have a vector, say V. If I want to double copy V back to V so as to get double V's inside the same container, why the following way doesn't work?

    copy (V.begin(),V.end(),V.begin());

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.