//Method 1:
set<int>:: iterator it;
for( it = s.begin(); it != s.end(); ++it){
int ans = *it;
cout << ans << endl;
}
//Method 2:
for( auto& it : s) {
cout << it << " ";
}
Code Example |
---|
Cpp :: insert vector to end of vector c++ |
Cpp :: c++ std::sort |
Cpp :: random number of 0 or 1 c++ |
Cpp :: c++ vector loop delete |
Cpp :: read text from file c++ |
Cpp :: SetUnhandledExceptionFilter |
Cpp :: fstring from float c++ ue4 |
Cpp :: c++ call method in same class |
Cpp :: c++ max of array |
Cpp :: c++ arithmetic operators |
Cpp :: include cpp |
Cpp :: read comma separated text file in c++ |
Cpp :: char ascii c++ |
Cpp :: c++ print string |
Cpp :: c++ reference |
Cpp :: hamming distance c++ |
Cpp :: delete from front in vector c++ |
Cpp :: c++ Sum of all the factors of a number |
Cpp :: are strings mutable in c++ |
Cpp :: remove from vector by value c++ |
Cpp :: iterate over vector in c++ |
Cpp :: for loop f# |
Cpp :: log in c++ |
Cpp :: selection sort c++ algorithm |
Cpp :: c++ get the line which call a function |
Cpp :: string length in c++ |
Cpp :: doubly linked list in cpp |
Cpp :: c++ if example |
Cpp :: set to vector |
Cpp :: pointer cpp |