samedi 28 mai 2016

Is there a solution instead of move for knapsack backtracking algorithm in C++

I used the solution of Backtracking of Knapsack solution with C++. I had the solution again from here. My compiler gives error at line move. Is there solution without using move? how can I modify the code without using the move?

if (issol == true)
        {
            if (! vsol.empty()) vsol.clear();
            std::move(temp.begin(), temp.end(), std::back_inserter(vsol));
            temp.clear();
            issol = false;
        } else temp.clear();
        return;

Aucun commentaire:

Enregistrer un commentaire