Search
 
SCRIPT & CODE EXAMPLE
 

CPP

how to get last element of set

// Example program
#include <iostream>
#include <string>
#include <set>
#include <iterator>
using namespace std;
int main()
{
    set<int>a = {5,9,100,25,4,6};
    auto it = a.end();
    it--;
    cout << *it;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: c++ stl vector get iterator from index 
Cpp :: c++ string find last number 
Cpp :: c++ delete printed characters 
Cpp :: c ++ program to insert into hashmap 
Cpp :: how to find product of a given numbers in c++ 
Cpp :: namespace file linking c++ 
Cpp :: c++ classes 
Cpp :: c++ - 
Cpp :: ifstream 
Cpp :: __builtin_popcount long long 
Cpp :: how to convert char to int in c++ 
Cpp :: Temparory Email Id 
Cpp :: how to insert in a queue c++ 
Cpp :: C++ Vector Operation Delete Elements 
Cpp :: tr bash 
Cpp :: c++ unordered_map initialize new value 
Cpp :: cpp foreach 
Cpp :: unordered_map in c++ 
Cpp :: c++ map vector as keys 
Cpp :: java to puthon converter 
Cpp :: c++ calling variable constructor 
Cpp :: two dimensional array A[N,M] with the random numbers from 10 to 90. 
Cpp :: how to make c++ read strlen 
Cpp :: copy file to vector c++ 
Cpp :: c++ to mips converter online 
Cpp :: c to c++ code converter 
Cpp :: c plus 
Cpp :: c++ program that put a space in between characters 
Cpp :: bnchch 
Cpp :: Difference Array | Range update query in O 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =