Answers for "how to get an element in a list c++"

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 get an element in a list c++"

Browse Popular Code Answers by Language