How can I get the penultimate element in a list? – stackoverflow.com 12:04 Posted by Unknown No Comments I have a std::list<double> foo; I'm using if (foo.size() >= 2){ double penultimate = *(--foo.rbegin()); } but this always gives me an arbitrary value of penultimate. What am I doing ... from Hot Questions - Stack Exchange OnStackOverflow via Blogspot Share this Google Facebook Twitter More Digg Linkedin Stumbleupon Delicious Tumblr BufferApp Pocket Evernote Unknown Artikel TerkaitPerforming -nt/-ot test in a POSIX sh – unix.stackexchange.comChanging all single quotes to be straight when within texttt – tex.stackexchange.comDesigner vs client: portfolio rights? – graphicdesign.stackexchange.comIs it a bad idea to show up at a company with no interview? – workplace.stackexchange.comhow to enforce c++ function only accept lvalue reference – stackoverflow.comIf a database only ever has one insert, is it best to index EVERYTHING? – dba.stackexchange.com
0 Comment to "How can I get the penultimate element in a list? – stackoverflow.com"
Post a Comment