0

I have put values into 6 elements of the vector Numbers like below.

What I wonder is if there is any function to check for the Highest value

for a given range of the vector.

Say I want to find the highest value from elements [3] to [5] wich in this case then will be: 6

I know I could use a loop to find this value but are there any built in method for something like this ?

```
std::vector<int> Numbers(5);
Numbers[0] = 1;
Numbers[1] = 2;
Numbers[2] = 3;
Numbers[3] = 4;
Numbers[4] = 5;
Numbers[5] = 6; //This has the highest value for ex: element 3 - 5
```