Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ access second last element of vector

arr2.rbegin()[1] // rbegin() is reverse order starting at 0 for last element, 1 for second-last
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #access #element #vector
ADD COMMENT
Topic
Name
8+6 =