Outputting end element of a vector

Hi everyone

I have used the stable_sort algorithm to place a vector into ascending order. However I need to out put the largest value ( which will be the end value).

Would someone be able to tell me how to do this?

Thank you!

The last element of a vector v is *(v.end() - 1) or *(v.rbegin()) or v[v.size() - 1].
Last edited on
Thank you so much! :-)
Topic archived. No new replies allowed.