c++ get element from list 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;