cpp list get element at index 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;