access element of list cpp code example
Example: how to get an element in a list c++
#include <list>
auto it = yourList.begin();
std::advance(it, index);
std::cout << *it;
#include <list>
auto it = yourList.begin();
std::advance(it, index);
std::cout << *it;