//this is a fairly crude method but worked for me when iterator //method didn't work. template <class T> T getItemAtIndex(std::list<T> list, int n) { int _pos = 0; for (T i : list) { if (_pos == n) { return i; } _pos++; } }