![]() |
VOOZH | about |
The set::cbegin() is a built-in function in C++ STL which returns a constant iterator pointing to the first element in the container. The iterator cannot be used to modify the elements in the set container. The iterators can be increased or decreased to traverse the set accordingly.
Syntax:
constant_iterator set_name.cbegin()
Parameters: The function does not accept any parameters.
Return value: The function returns a constant iterator pointing to the first element in the container.
Program to demonstrate the set::cbegin() method.
10 11 12 14 15
set::cend() is a built-in function in C++ STL which returns a constant iterator pointing to the position past the last element in the container. The iterator cannot be used to modify the elements in the set container. The iterators can be increased or decreased to traverse in the set accordingly.
Syntax:
constant_iterator set_name.cend()
Parameters: The function does not accept any parameters.
Return value: The function returns a constant iterator pointing to the position past the last element in the container in the container.
Program to demonstrate the set::cend() method.
10 11 12 14 15