Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 420 Bytes

begin.md

File metadata and controls

15 lines (11 loc) · 420 Bytes

begin

Description : begin() function is used to return an iterator pointing to the first element of the list container.

Example:

    // declaration of list container 
    std::list<int> mylist{ 1, 2, 3, 4, 5 }; 
  
    // using begin() to print list 
    for (auto it = mylist.begin(); it != mylist.end(); ++it) 
        std::cout << ' ' << *it; 

Run Code