/*push_back and pop_back are available in:
std::vector
std::deque
std::list
They are not available in associative containers like
std::set,
std::map,
std::unordered_set, and
std::unordered_map.
*/
#include <iostream>
#include <set>
int main() {
std::set<int> s = {1,6,9,3,0};
for(const auto &elem : s){
std::cout<<elem<<' ';
}
std::cout<<std::endl;
s.erase(9);
for(const auto &elem : s){
std::cout<<elem<<' ';
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: