how to find an element in a aset in c++ code example
Example 1: c++ find element in set
// initialize set
std::set<std::string> my_set({"foo", "bar"});
// find element in set
my_set.find("foo");
Example 2: how to get an element in a list c++
#include <list>
auto it = yourList.begin();
std::advance(it, index);
std::cout << *it;