cpp vector emplace code example
Example: what does emplace_back back return in c++
// vector::emplace_back
#include <iostream>
#include <vector>
int main ()
{
std::vector<int> myvector = {10,20,30};
myvector.emplace_back (100);
myvector.emplace_back (200);
std::cout << "myvector contains:";
for (auto& x: myvector)
std::cout << ' ' << x;
std::cout << '\n';
return 0;
}