Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 431 Bytes

cend.md

File metadata and controls

20 lines (16 loc) · 431 Bytes

cend

Description: This method is used to return a constant iterator pointing to the past-the-end element in the container Example

#include <iostream>
#include <set>

int main(){
	std::set<int> myset = {50,20,60,10,25};
	std::cout<<"myset contains: ";
	for(auto i = myset.cbegin(); i != myset.cend(); i++)
		std::cout<<' '<< *i;
	
	std::cout<<'\n';
return 0;
}

Run Code