min_element(vec.begin()+3,vec.begin()+5)
这里的vec.begin+3
是包含的,但不包含vec.begin+5
如何使它包含在内?
min_element(vec.begin()+3,vec.begin()+5)
Here
vec.begin+3
andvec.begin+5
are not inclusive how do i make them inclusive?
That's not correct.
vec.begin()+3
is inclusive.
To make vec.begin()+5
inclusive, use vec.begin()+6
as the second argument.
min_element(vec.begin()+3, vec.begin()+6)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.