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

Latest commit

 

History

History
17 lines (12 loc) · 490 Bytes

cend.md

File metadata and controls

17 lines (12 loc) · 490 Bytes

cend

Description : The list::cend() is a built-in function in C++ STL which returns a constant random access iterator which points to the end of the list.

Example:

    // declaration of list 
    std::list<int> lis = { 100, 200, 300, 400, 500 }; 
  
    // printing list elements 
    std::cout << "List: " << std::endl; 
  
    for (auto it = lis.cbegin(); it != lis.cend(); ++it) 
        std::cout << *it << " "; 

Run Code