Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Latest commit

History

History
18 lines (13 loc) 路 390 Bytes

emplace_back.md

File metadata and controls

18 lines (13 loc) 路 390 Bytes

emplace_back

Description : emplace_back() function is used to add an element to the end of the list

Example:

    std::list<int> mylist;

    mylist.emplace_back(1);
    mylist.emplace_back(2);
    mylist.emplace_back(3);

    std::cout << "mylist contains: ";
    for (auto& x: mylist)
        std::cout << x << " ";
 

Run Code