back inserter vs push back

Solutions on MaxInterview for back inserter vs push back by the best coders in the world

showing results for - "back inserter vs push back"
Manuel
07 Jul 2018
1std::vector<std::string> a(100, "Hello, World");
2std::vector<std::string> b;
3std::copy(a.begin(), a.end(), std::back_inserter(b));