Answers for "how to access list elements cpp"

C++
0

how to get an element in a list c++

#include <list>

auto it = yourList.begin();
std::advance(it, index);

std::cout << *it;
Posted by: Guest on November-06-2020

Code answers related to "how to access list elements cpp"

Browse Popular Code Answers by Language