Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The idiomatic way to access and manipulate STL data structures is through iterators. In this case, an iterator for a std::list is basically a pointer/reference to the person container in the article, so if you're referring to the list objects via their iterators there's no need for O(n) list traversal.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: