access an element in list c++ 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;