first and last element of vector c++ code example
Example: how to get the last value from array in c++
a = [1,2,3,4,5,6,7]
int x = a.size()
// last element of list
a[x-1] // ourput -> 7
a = [1,2,3,4,5,6,7]
int x = a.size()
// last element of list
a[x-1] // ourput -> 7